Skip to content

🔀 Merge pull request #120 from cnr-ibba/dep… #185

🔀 Merge pull request #120 from cnr-ibba/dep…

🔀 Merge pull request #120 from cnr-ibba/dep… #185

Workflow file for this run

name: Lint Workflow
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
- devel
pull_request:
branches:
- main
- devel
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: SMARTER-database
channel-priority: strict
environment-file: environment.yml
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Install dependencies
shell: bash -l {0}
run: make requirements
- name: Conda list
shell: pwsh
run: conda list
- name: Lint with flake8
shell: bash -l {0}
run: flake8 src