Skip to content

Commit

Permalink
workflow updates
Browse files Browse the repository at this point in the history
  • Loading branch information
aelaguiz committed Mar 21, 2024
1 parent fb82b1a commit ef5f3c8
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
name: Run Tests

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: |
poetry install
- name: Run tests with coverage
run: |
poetry run test
poetry run pytest --cov=langdspy --cov-report=html tests/
- name: Check test results
if: failure()
run: |
echo "Tests failed. Please fix the failing tests."
exit 1
- name: Generate coverage report
run: |
poetry run coverage
poetry run coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit ef5f3c8

Please sign in to comment.