Skip to content

Clean up and fix build #4

Clean up and fix build

Clean up and fix build #4

Workflow file for this run

name: D4LF - CI
on: [pull_request]
env:
# To force cache update
CACHE_NUMBER: 1
jobs:
tests:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: d4lf
python-version: '3.11'
use-mamba: true
- name: Cache Conda env
uses: actions/cache@v2
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
run:
mamba env update -n d4lf -f
environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Powershell Core
shell: powershell
run: |
conda info
conda list
- name: Pytest & Coverage
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate d4lf
python -c "import sys; print(sys.version)"
coverage run --source=./src -m pytest -v -s
- name: Coverage Report Generation
shell: powershell
run: |
C:\Miniconda\condabin\conda.bat activate d4lf
coverage xml
- name: Lint black formatting
shell: powershell
run: black --check ./**/*.py