Skip to content

Continuous Integration #604

Continuous Integration

Continuous Integration #604

Workflow file for this run

name: Continuous Integration
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 8 * * *"
push:
pull_request:
workflow_dispatch:
concurrency:
group: actions-id-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-formatting:
name: Check Formatting Errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
python -m pip install pycodestyle
- name: Run pycodestyle
run: |
pycodestyle --statistics \
--count \
--max-line-length 150 \
--max-doc-length 200 \
--ignore=E266,E501,W503,W505 \
--show-source \
.
build-and-test:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Subtest
steps:
- uses: actions/checkout@v3
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: rdmc_env
environment-file: environment.yml
miniforge-variant: mambaforge
miniforge-version: latest
python-version: ${{ matrix.python-version }}
auto-activate-base: true
use-mamba: true
- name: Install RDMC
run: python -m pip install --no-deps -vv ./
- name: Install Pytest
run: mamba install -y pytest pytest-cov # temporarily remove "pytest-check"
- name: Mamba info
run: |
mamba info
mamba list
- name: Run Unit Tests
run: pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage