Skip to content

Adding User input

Adding User input #571

Workflow file for this run

name: CI
on: [push]
jobs:
miniconda:
name: Setup and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2
- uses: snyk/actions/setup@master
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
environment-file: environment.yml
python-version: 3.8
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@v2
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=./ --cov-report=xml
env:
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }}
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
fail_ci_if_error: true
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
- name: Run Snyk to check for vulnerabilities
run: |
pip install -r dev-requirements.txt
snyk test --file=dev-requirements.txt --package-manager=pip --severity-threshold=high
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}