Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github workflow for testing #9

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Validate & Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.6", "3.7"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Install Poetry
#uses: abatilo/[email protected] # Pinned to SHA hash
uses: abatilo/actions-poetry@8284d202bc272a8d0597e26e1c0b4a0d0c73db93
with:
poetry-version: 1.1.4
- name: Install Dependencies
run: |
poetry install
- name: Check Formatting
run: |
poetry run black --check src tests
- name: Test
id: pytest
run: |
poetry run pytest tests --junit-xml=build/test-results/pytest-main.xml
- name: Publish Test Report 2
# Don't use original broken action
# uses: ashley-taylor/[email protected] # Pinned to SHA hash
# uses: ashley-taylor/junit-report-annotations-action@562e0277515cae408f30ad1ea2d6dea44fc1df87

# uses: KyleAure/[email protected] # Pinned to SHA hash
uses: KyleAure/junit-report-annotations-action@76895d655157a1d21082afe5acb6101859267aaf
if: ${{ failure() && steps.pytest.outcome == 'failure' }}
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
includeSummary: false
name: Failed Tests for Py${{ matrix.python-version }}
numFailures: 25
path: "**/build/test-results/*.xml"
145 changes: 66 additions & 79 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ hypothesis = "^5.43.3"
pytest = "^6.2.1"

[build-system]
requires = ["poetry>=1.0.3"]
requires = ["poetry>=1.1.0"]
build-backend = "poetry.masonry.api"