Skip to content

DEVOPS-1133: Pin GitHub Actions to commit hashes #142

DEVOPS-1133: Pin GitHub Actions to commit hashes

DEVOPS-1133: Pin GitHub Actions to commit hashes #142

name: pytest on Unix OS
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**
push:
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
name: pytest (Unix)
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
python_ver: ['3.10']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
env:
PYTHONUTF8: 1
CONDA_CHANNEL_PRIORITY: strict
PIP_NO_DEPS: 1 # all dependencies are installed from conda
CONDA_LOCK_ENV_FILE: environments/py-${{ matrix.python_ver }}-${{ startsWith(matrix.os, 'macos') && 'osx' || 'linux' }}-64-dev.conda.lock.yml
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
lfs: true
- name: Setup conda env
uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1.11.0
with:
environment-file: ${{ env.CONDA_LOCK_ENV_FILE }}
environment-name: test_env
cache-downloads: true
- name: pytest
run: pytest --cov --cov-report=xml