-
Notifications
You must be signed in to change notification settings - Fork 4
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 #1 from explosion/pre-release-fixes
add unit tests in ci
- Loading branch information
Showing
4 changed files
with
59 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
cache: "pip" # caching pip dependencies | ||
|
||
- name: Check out Prodigy | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: explosion/prodigy | ||
ref: v1.14.0 | ||
path: ./prodigy | ||
ssh-key: ${{ secrets.GHA_PRODIGY_READ }} | ||
|
||
- name: Install prodigy | ||
run: | | ||
ls -la | ||
pip install ./prodigy | ||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e . | ||
pip install ruff pytest | ||
- name: Run ruff | ||
if: always() | ||
shell: bash | ||
run: python -m ruff prodigy_pdf tests | ||
|
||
- name: Run pytest | ||
if: always() | ||
shell: bash | ||
run: python -m pytest tests |
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,2 @@ | ||
[tool.ruff] | ||
line-length = 120 |
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