Migrating anaconda-linter
to the Packaging Automation Team Standards
#584
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
name: Test | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ./.github/actions/setup-env | |
- uses: pre-commit/[email protected] | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ./.github/actions/setup-env | |
- name: Run tests | |
run: | | |
make test | |
- name: Archive CI Artefacts | |
uses: actions/[email protected] | |
with: | |
name: ci-artifacts | |
path: artifacts/** | |
retention-days: 5 | |
build-recipe: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Cache conda env | |
id: cache-conda | |
uses: actions/[email protected] | |
env: | |
cache-name: conda-env-cache | |
with: | |
path: '/usr/share/miniconda/envs' | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/environment.yml') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build package | |
run: | | |
source $CONDA/bin/activate | |
conda install conda-build | |
conda-build . | |
lint-recipe: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ./.github/actions/setup-env | |
- name: Run lint | |
run: | | |
OUTPUT=`conda-lint .` | |
[[ ${OUTPUT} == "All checks OK" ]] || exit 1 |