Continuous Integration #396
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
# This file is part of the Minnesota Population Center's NHGISXWALK. | |
# For copyright and licensing information, see the NOTICE and LICENSE files | |
# in this project's top-level directory, and also on-line at: | |
# https://github.com/ipums/nhgisxwalk | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
schedule: | |
- cron: '59 23 * * *' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Manual CI Reason | |
default: test | |
required: false | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/action@v3.0.1 | |
testing: | |
needs: linting | |
name: micromamba (${{ matrix.os }}, ${{ matrix.environment-file }}) | |
runs-on: ${{ matrix.os }} | |
env: | |
RUN_TESTS: pytest nhgisxwalk -v -r a --cov nhgisxwalk --doctest-modules --cov-config .coveragerc --cov-report xml --color yes --cov-append --cov-report term-missing | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
environment-file: [ci/39.yaml, ci/310.yaml, ci/311.yaml] | |
os: ['ubuntu-latest'] | |
include: | |
- environment-file: ci/311.yaml | |
os: macos-latest | |
- environment-file: ci/311.yaml | |
os: windows-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: setup micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ${{ matrix.environment-file }} | |
micromamba-version: 'latest' | |
- name: environment info | |
run: | | |
micromamba info | |
micromamba list | |
- name: spatial versions | |
run: | | |
python -c "import geopandas; geopandas.show_versions();" | |
- name: run tests - bash | |
run: ${{ env.RUN_TESTS }} | |
- name: codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
name: nhgisxwalk-codecov |