Skip to content

Merge pull request #285 from anaconda-distribution/renovate/asottile-… #543

Merge pull request #285 from anaconda-distribution/renovate/asottile-…

Merge pull request #285 from anaconda-distribution/renovate/asottile-… #543

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: Test
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4
with:
python-version: '3.9'
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # tag=v3.0.0
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
- uses: ./.github/actions/setup-env
- name: Run tests
run: |
source $CONDA/bin/activate
conda activate anaconda-linter
make test
- name: Archive CI Artefacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: ci-artifacts
path: artifacts/**
retention-days: 5
build-recipe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
- name: Cache conda env
id: cache-conda
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
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: actions/checkout@72f2cec99f417b1a1c5e2e88945068983b7965f9
- uses: ./.github/actions/setup-env
- name: Run lint
run: |
source $CONDA/bin/activate
conda activate anaconda-linter
OUTPUT=`conda-lint .`
[[ ${OUTPUT} == "All checks OK" ]] || exit 1