Skip to content

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed #3531

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed

MNT: Use hash for Action workflow versions and update, and add dependabot, if needed #3531

Workflow file for this run

name: test
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.11"
- run: pip install bandit
- run: bandit ./jwql/ -c .bandit
test:
name: test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ "ubuntu-latest", "macos-latest" ]
python-version: [ "3.11", "3.12" ]
fail-fast: false
env:
PYTHONUNBUFFERED: 1
defaults:
run:
shell: micromamba-shell {0}
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
with:
environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
init-shell: none
generate-run-shell: true
- run: pip install -e .[test] pytest-xdist
- run: pip list
- run: micromamba env export
- if: runner.os == 'Linux'
uses: supercharge/redis-github-action@ea9b21c6ecece47bd99595c532e481390ea0f044 # 1.8.0
with:
redis-version: 5.0
- run: python -c "import jwql; print('Version ' + jwql.__version__); print('Path ' + jwql.__path__[0])"
- run: pytest -n auto jwql/tests/