-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from knaaptime/testing
update testing
- Loading branch information
Showing
4 changed files
with
58 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,77 @@ | ||
name: Unit Tests | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- '*' | ||
schedule: | ||
- cron: '59 23 * * *' | ||
- cron: "0 0 * * 1,4" | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Manual Unittest Run | ||
default: test | ||
required: false | ||
|
||
jobs: | ||
unittests: | ||
name: CI (${{ matrix.os }}-${{ matrix.environment-file }}) | ||
Tests: | ||
name: ${{ matrix.os }}, ${{ matrix.environment-file }} | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: false | ||
timeout-minutes: 45 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
environment-file: [.ci/39.yml, .ci/310.yml, .ci/311.yml] | ||
experimental: [false] | ||
fail-fast: [false] | ||
|
||
os: [ubuntu-latest] | ||
environment-file: | ||
- ci/310.yml | ||
- ci/311.yml | ||
- ci/312.yml | ||
include: | ||
- environment-file: ci/311.yml | ||
os: macos-latest | ||
- environment-file: ci/311.yml | ||
os: macos-14 # Apple Silicon | ||
- environment-file: ci/311.yml | ||
os: windows-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: setup micromamba | ||
uses: mamba-org/provision-with-micromamba@main | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: ${{ matrix.environment-file }} | ||
micromamba-version: 'latest' | ||
|
||
- name: reinstall segregation - bash | ||
shell: bash -l {0} | ||
run: pip install -e . --no-deps --force-reinstall | ||
if: matrix.os != 'windows-latest' | ||
|
||
- name: reinstall segregation - powershell | ||
shell: powershell | ||
run: pip install -e . --no-deps --force-reinstall | ||
if: matrix.os == 'windows-latest' | ||
|
||
- name: run pytest - bash | ||
shell: bash -l {0} | ||
run: pytest -v segregation --cov=segregation --cov-report=xml | ||
if: matrix.os != 'windows-latest' | ||
|
||
- name: run pytest - powershell | ||
shell: powershell | ||
run: pytest -v segregation --cov=segregation --cov-report=xml | ||
if: matrix.os == 'windows-latest' | ||
|
||
|
||
- name: Test segregation | ||
run: | | ||
pytest \ | ||
segregation \ | ||
-v \ | ||
-r a \ | ||
--color yes \ | ||
--cov segregation \ | ||
--cov-append \ | ||
--cov-report term-missing \ | ||
--cov-report xml \ | ||
- name: codecov | ||
uses: codecov/codecov-action@v1 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
name: segregation-codecov | ||
|
||
- name: Generate and publish the report | ||
if: | | ||
failure() | ||
&& steps.status.outcome == 'failure' | ||
&& github.event_name == 'schedule' | ||
&& github.repository_owner == 'pysal' | ||
uses: xarray-contrib/issue-from-pytest-log@v1 | ||
with: | ||
log-path: pytest-log.jsonl |
File renamed without changes.
File renamed without changes.
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