Skip to content

Commit

Permalink
Another try
Browse files Browse the repository at this point in the history
  • Loading branch information
rmcar17 committed Feb 14, 2024
1 parent b213e9b commit 8450677
Showing 1 changed file with 49 additions and 33 deletions.
82 changes: 49 additions & 33 deletions .github/workflows/test_main.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
name: CI

on:
push:
branches-ignore:
- main
pull_request:
branches-ignore:
- main
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FORCE_COLOR: "3"

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0

tests:
runs-on: ${{ matrix.runs-on }}
needs: [lint]
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: [ubuntu-20.04, macos-latest, windows-2019, windows-2022]

name: Tests on ${{ matrix.runs-on }}
steps:
- uses: "actions/checkout@v2"
with:
fetch-depth: 0

# Setup env
- uses: "actions/setup-python@v3"
with:
python-version: "${{ matrix.python-version }}"

- name: "Installs for ${{ matrix.python-version }}"
run: |
python --version
pip install --upgrade pip wheel setuptools flit
pip install --upgrade nox
- name: "Run nox for ${{ matrix.python-version }}"
run: "nox -s test-${{ matrix.python-version }}"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: rmcar17/SpectralClusterSupertree
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup nox
uses: wntrblm/nox@2023.04.22
with:
python-versions: "3.10,3.11"

# We check all Python's on Linux, because it's fast.
# We check minimum Python and maximum Python on all OS's.

- name: Test on 🐍 3.10
if: runner.os == 'Linux'
run: nox -s tests-3.10 -- --cov --cov-report=xml --cov-report=term --cov-append --durations=20
- name: Test on 🐍 3.11
run: nox -s tests-3.11 -- --cov --cov-report=xml --cov-report=term --cov-append --durations=20

- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.runs-on }}-any
verbose: true

0 comments on commit 8450677

Please sign in to comment.