Skip to content

Commit 0cbe674

Browse files
authored
Merge branch 'GrafeasGroup:main' into main
2 parents 70e611d + 83a6c60 commit 0cbe674

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1022
-608
lines changed
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,44 @@
11
name: Automated Testing
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
branches:
96
- main
107

118
jobs:
129
analyze:
13-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1411

1512
steps:
1613
- uses: actions/checkout@v2
17-
- uses: actions/setup-python@v1
14+
- uses: actions/setup-python@v4
1815
with:
19-
python-version: '3.9'
16+
python-version: '3.10.x'
2017
architecture: 'x64'
2118
- run: |
2219
pip install --upgrade pip
2320
pip install poetry
2421
hash -r
2522
26-
poetry install -v --extras ci
23+
poetry install
2724
- run: poetry run mypy .
2825
- run: poetry run flake8 .
2926

3027
test:
31-
runs-on: ubuntu-18.04
32-
strategy:
33-
max-parallel: 4
34-
matrix:
35-
python-version:
36-
- '3.9'
28+
runs-on: ubuntu-latest
3729

3830
steps:
3931
- uses: actions/checkout@v2
40-
- name: Setup Python ${{ matrix.python-version }}
32+
- name: Setup Python 3.10
4133
uses: actions/setup-python@v1
4234
with:
43-
python-version: ${{ matrix.python-version }}
35+
python-version: '3.10.x'
4436
architecture: 'x64'
4537
- name: Install Poetry
4638
run: |
4739
pip install --upgrade pip
4840
pip install poetry
4941
hash -r
5042
51-
poetry install -v --extras ci
43+
poetry install
5244
- run: poetry run pytest --cov=tor
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10.x'
18+
- name: Install Env
19+
# shiv will download the dependencies it needs on its own
20+
run: |
21+
pip install --upgrade pip
22+
pip install shiv
23+
pip install poetry
24+
pip install poetry2setup
25+
- name: Add CURRENT_TIME env property
26+
# the smart thing to do here would be to use the commit hash, but
27+
# github releases are ALPHABETIZED, so a commit hash of `abcdef` will
28+
# not be listed as the latest release if `defabc` came before. (╥﹏╥)
29+
run: echo "CURRENT_TIME_VERSION=v$(date '+%s')" >> $GITHUB_ENV
30+
- name: Build the sucker
31+
run: |
32+
sed -i -e "s/?????/${{ env.CURRENT_TIME_VERSION }}/g" tor/__init__.py
33+
make build
34+
- uses: ncipollo/release-action@v1
35+
with:
36+
artifacts: "build/tor.pyz"
37+
body: "It's releasin' time"
38+
generateReleaseNotes: true
39+
tag: ${{ env.CURRENT_TIME_VERSION }}
40+
commit: main
41+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build tor.pyz and test
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.10.x'
15+
- name: Install Env
16+
# shiv will download the dependencies it needs on its own
17+
run: |
18+
pip install --upgrade pip
19+
pip install shiv
20+
pip install poetry
21+
pip install poetry2setup
22+
- name: Add CURRENT_TIME env property
23+
# the smart thing to do here would be to use the commit hash, but
24+
# github releases are ALPHABETIZED, so a commit hash of `abcdef` will
25+
# not be listed as the latest release if `defabc` came before. (╥﹏╥)
26+
run: echo "CURRENT_TIME_VERSION=v$(date '+%s')" >> $GITHUB_ENV
27+
- name: Build the sucker
28+
run: |
29+
sed -i -e "s/?????/${{ env.CURRENT_TIME_VERSION }}/g" tor/__init__.py
30+
make build
31+
- name: Remove source to make sure it doesn't interfere with the tests
32+
run: rm -rf tor/
33+
- name: Run selfcheck on compiled binary
34+
run: ./build/tor.pyz selfcheck

.github/workflows/publish.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,7 @@ ENV/
104104
praw.ini
105105
*.port
106106
*.sw[op]
107+
108+
# build artifacts
109+
tor.pyz
110+
setup.py

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
graft tor/test/

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
setup:
2+
poetry2setup > setup.py
3+
4+
build: setup shiv
5+
6+
clean:
7+
rm setup.py
8+
9+
shiv:
10+
mkdir -p build
11+
shiv -c tor -o build/tor.pyz . --compressed

0 commit comments

Comments
 (0)