Skip to content

Commit

Permalink
added a test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
justrach committed Oct 31, 2024
1 parent 26bb996 commit 0ae1f8e
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Python Package

on:
push:
branches: [ main, master, development ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build pytest pytest-cov pytest-asyncio
pip install -e .
- name: Run tests with coverage
run: |
pytest --cov=kew --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true

build:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build

- name: Check package
run: twine check dist/*

- name: Store build artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/

0 comments on commit 0ae1f8e

Please sign in to comment.