keep only ubuntu-latest for now #488
Workflow file for this run
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: [push] | |
jobs: | |
miniconda: | |
name: Setup and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: test | |
environment-file: environment.yml | |
use-mamba: true | |
auto-activate-base: true | |
- shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- name: Install earthspy | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
# Full git history is needed to get a proper list of changed files within `super-linter` | |
fetch-depth: 0 | |
- name: Lint code base | |
uses: github/super-linter/slim@v4.9.0 | |
env: | |
VALIDATE_ALL_CODEBASE: true | |
VALIDATE_JSON: true | |
VALIDATE_YAML: true | |
DEFAULT_BRANCH: main | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests and generate coverage report | |
shell: bash -l {0} | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pytest --cov --junitxml=junit.xml -o junit_family=legacy | |
env: | |
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} | |
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Install dev requirements | |
shell: bash -l {0} | |
run: | | |
pip install -r dev-requirements.txt | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/python@master | |
continue-on-error: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --file=dev-requirements.txt --package-manager=pip --severity-threshold=high --skip-unresolved=true |