Skip to content

Bump github/super-linter from 5.0.0 to 7 (#117) #552

Bump github/super-linter from 5.0.0 to 7 (#117)

Bump github/super-linter from 5.0.0 to 7 (#117) #552

Workflow file for this run

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@v7
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 requirements-dev.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=requirements-dev.txt --package-manager=pip --severity-threshold=high --skip-unresolved=true