Skip to content

Version bump, lock files support no longer experimental #72

Version bump, lock files support no longer experimental

Version bump, lock files support no longer experimental #72

Workflow file for this run

# This workflows will create a new demo repository using The Hatchlor for demonstration purposes
name: Run tests
on:
push:
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
cookiecutter_cfg: ['default.yml', 'lock-file.yml', 'proprietary.yml']
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
path: ./hatchlor-template
- name: Setup Python environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: 'latest'
environment-file: ./hatchlor-template/.github/test_environment.yml
init-shell: >-
bash
powershell
cache-environment: true
post-cleanup: 'all'
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
- name: Run cookiecutter
run: cookiecutter --no-input ./hatchlor-template --config-file ./hatchlor-template/configs/${{ matrix.cookiecutter_cfg }}
- name: Test some general hatch commands
working-directory: ./hatchlor-demo
run: |
hatch run fibonacci 10
hatch run test:cov
hatch run lint:all
hatch run pre-commit run --all-files
- name: Build the package
working-directory: ./hatchlor-demo
run: hatch build
- name: Test lock-file related commands
if: matrix.cookiecutter_cfg == 'lock-file.yml'
working-directory: ./hatchlor-demo
run: |
hatch run upgrade-all
hatch run test:upgrade-all
hatch run test:upgrade-pkg pytest