Skip to content

Run workflows on feature branches #34

Run workflows on feature branches

Run workflows on feature branches #34

name: conda - Build, Lint, and Test
on:
push:
branches: [ main, "v*"]
pull_request:
branches: [ main, "v*"]
jobs:
build-lint-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Get git tags
run: git fetch --prune --unshallow --tags
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: "thor"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
conda install -c defaults -c conda-forge -c astropy -c moeyensj --file requirements.txt --yes
- name: Build and install
run: pip install . --no-deps
- name: Lint
run: pre-commit run --all-files
- name: Test
run: pytest . --cov