Skip to content

Commit

Permalink
update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
whitews committed Dec 11, 2023
1 parent 100a367 commit 830cd54
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 31 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/test_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build & test

on:
workflow_call:

jobs:
test:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install
run: |
pip install coverage
pip install -r requirements_test.txt
pip install -e .
- name: Run tests with coverage
run: |
coverage run --source flowio run_tests.py
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: true
verbose: true
35 changes: 4 additions & 31 deletions .github/workflows/tests_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,10 @@ on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]

steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'develop'

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

- run: pip install coverage
- run: pip install -r requirements_test.txt

- name: Run tests with coverage
run: |
coverage run --source flowio --omit="flowio/tests/*" run_tests.py
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: true
verbose: true
uses: whitews/FlowIO/.github/workflows/test_base.yml@develop

0 comments on commit 830cd54

Please sign in to comment.