Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from GrafeasGroup/fix-deploy
Browse files Browse the repository at this point in the history
add missing PR check and update deps to allow building
  • Loading branch information
itsthejoker authored Sep 5, 2022
2 parents 11aec2c + d0a415a commit 99d8cdd
Show file tree
Hide file tree
Showing 7 changed files with 583 additions and 247 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/automated-tests.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
pip install --upgrade pip
pip install shiv
pip install poetry
pip install poetry2setup
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
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build_and_test.yml
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
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 99d8cdd

Please sign in to comment.