This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from GrafeasGroup/fix-deploy
add missing PR check and update deps to allow building
- Loading branch information
Showing
7 changed files
with
583 additions
and
247 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,42 @@ | ||
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.8' | ||
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 flake8 . | ||
|
||
test: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: | ||
- '3.8' | ||
- '3.9' | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v4 | ||
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_ocr |
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
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_ocr.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 git+https://github.com/abersheeran/poetry2setup@master | ||
- 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_ocr/__init__.py | ||
make build | ||
- name: Remove source to make sure it doesn't interfere with the tests | ||
run: rm -rf tor_ocr/ | ||
- name: Run selfcheck on compiled binary | ||
run: ./build/tor_ocr.pyz selfcheck |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.