DOC: case matters #382
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "35 4 */6 * *" # Every 6 days. | |
pull_request: | |
push: | |
jobs: | |
build-iqtree: | |
name: Fetch or Build IQ-TREE 2 Static Library on ${{matrix.os}} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14] # Intel linux, Intel Mac, ARM Mac | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- id: build | |
uses: ./.github/actions/build-iqtree | |
with: | |
os: ${{ matrix.os }} | |
outputs: | |
iqtree2-sha: ${{steps.build.outputs.iqtree2-sha}} | |
tests: | |
name: Run Tests with Python ${{matrix.python-version}} on ${{matrix.os}} | |
needs: build-iqtree | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14] # Intel linux, Intel Mac, ARM Mac | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: ./.github/actions/setup-piqtree | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }} | |
- name: Update Homebrew | |
if: matrix.os != 'ubuntu-latest' | |
run: | | |
brew update | |
brew install llvm | |
- name: Run Nox Testing | |
run: | | |
pip install nox | |
nox -s test-${{ matrix.python-version }} -- --cov --cov-report=lcov:${{matrix.os}}-${{matrix.python-version}}.lcov --cov-report=term --cov-append --durations=20 | |
- name: Coveralls Parallel | |
if: matrix.os != 'macos-13' | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
github-token: ${{secrets.github_token}} | |
flag-name: run-${{matrix.python-version}}-${{matrix.os}} | |
file: "${{matrix.os}}-${{matrix.python-version}}.lcov" | |
upload-coverage: | |
name: "Finish Coveralls" | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true | |
type_check: | |
name: "Type Check" | |
needs: build-iqtree | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-piqtree | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }} | |
- name: "Run Type Checking for ${{ matrix.python-version }}" | |
run: | | |
pip install nox | |
nox -s type_check-${{ matrix.python-version }} | |
lint: | |
name: "Linting" | |
needs: build-iqtree | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: "actions/checkout@v4" | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup-piqtree | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }} | |
- name: "Run Type Checking for ${{ matrix.python-version }}" | |
run: | | |
pip install nox | |
nox -s ruff-${{ matrix.python-version }} |