forked from GrafeasGroup/tor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GrafeasGroup:main' into main
- Loading branch information
Showing
61 changed files
with
1,022 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,44 @@ | ||
name: Automated Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
python-version: '3.10.x' | ||
architecture: 'x64' | ||
- run: | | ||
pip install --upgrade pip | ||
pip install poetry | ||
hash -r | ||
poetry install -v --extras ci | ||
poetry install | ||
- run: poetry run mypy . | ||
- run: poetry run flake8 . | ||
|
||
test: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: | ||
- '3.9' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
python-version: '3.10.x' | ||
architecture: 'x64' | ||
- name: Install Poetry | ||
run: | | ||
pip install --upgrade pip | ||
pip install poetry | ||
hash -r | ||
poetry install -v --extras ci | ||
poetry install | ||
- run: poetry run pytest --cov=tor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10.x' | ||
- name: Install Env | ||
# shiv will download the dependencies it needs on its own | ||
run: | | ||
pip install --upgrade pip | ||
pip install shiv | ||
pip install poetry | ||
pip install poetry2setup | ||
- name: Add CURRENT_TIME env property | ||
# the smart thing to do here would be to use the commit hash, but | ||
# github releases are ALPHABETIZED, so a commit hash of `abcdef` will | ||
# not be listed as the latest release if `defabc` came before. (╥﹏╥) | ||
run: echo "CURRENT_TIME_VERSION=v$(date '+%s')" >> $GITHUB_ENV | ||
- name: Build the sucker | ||
run: | | ||
sed -i -e "s/?????/${{ env.CURRENT_TIME_VERSION }}/g" tor/__init__.py | ||
make build | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "build/tor.pyz" | ||
body: "It's releasin' time" | ||
generateReleaseNotes: true | ||
tag: ${{ env.CURRENT_TIME_VERSION }} | ||
commit: main | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build tor.pyz and test | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10.x' | ||
- name: Install Env | ||
# shiv will download the dependencies it needs on its own | ||
run: | | ||
pip install --upgrade pip | ||
pip install shiv | ||
pip install poetry | ||
pip install poetry2setup | ||
- name: Add CURRENT_TIME env property | ||
# the smart thing to do here would be to use the commit hash, but | ||
# github releases are ALPHABETIZED, so a commit hash of `abcdef` will | ||
# not be listed as the latest release if `defabc` came before. (╥﹏╥) | ||
run: echo "CURRENT_TIME_VERSION=v$(date '+%s')" >> $GITHUB_ENV | ||
- name: Build the sucker | ||
run: | | ||
sed -i -e "s/?????/${{ env.CURRENT_TIME_VERSION }}/g" tor/__init__.py | ||
make build | ||
- name: Remove source to make sure it doesn't interfere with the tests | ||
run: rm -rf tor/ | ||
- name: Run selfcheck on compiled binary | ||
run: ./build/tor.pyz selfcheck |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,3 +104,7 @@ ENV/ | |
praw.ini | ||
*.port | ||
*.sw[op] | ||
|
||
# build artifacts | ||
tor.pyz | ||
setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
graft tor/test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
setup: | ||
poetry2setup > setup.py | ||
|
||
build: setup shiv | ||
|
||
clean: | ||
rm setup.py | ||
|
||
shiv: | ||
mkdir -p build | ||
shiv -c tor -o build/tor.pyz . --compressed |
Oops, something went wrong.