Skip to content

Commit

Permalink
ci: update test action
Browse files Browse the repository at this point in the history
  • Loading branch information
evtn committed May 2, 2024
1 parent baae2ab commit a4a109f
Showing 1 changed file with 19 additions and 28 deletions.
47 changes: 19 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,39 @@
name: Test that everything works
name: Test

on:
workflow_dispatch:
push:
branches:
- pub
paths:
- "**.py"
- "**.yml"
pull_request:
paths:
- "**.py"

- "**.yml"
jobs:
check_types:
runs-on: ubuntu-latest
name: Check Types
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: git-checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: abatilo/actions-poetry@v2

- run: poetry install --with dev
- run: poetry run pyright
- run: poetry run pyright gekkota/*.py

run-tests:
runs-on: ubuntu-latest
Expand All @@ -35,7 +42,6 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

name: Run Tests

steps:
- name: git-checkout
uses: actions/checkout@v3
Expand All @@ -50,30 +56,15 @@ jobs:

- run: poetry install --with dev

- name: Test
run: poetry run coverage run -m pytest test/

update-coverage:
runs-on: ubuntu-latest
name: Update Coverage

steps:
- name: git-checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4

- name: Install Poetry
uses: abatilo/actions-poetry@v2

- run: poetry install --with dev

- name: Test
run: poetry run coverage run --include "gekkota/*" -m pytest test/

- name: Coveralls update
- name: Convert coverage data to XML
run: poetry run coverage xml

run: poetry run coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Coveralls Update
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.python-version }}
coverage_format: cobertura

0 comments on commit a4a109f

Please sign in to comment.