Skip to content

Merge pull request #28 from Climdyn/bug_fix/ground_basis_bug #44

Merge pull request #28 from Climdyn/bug_fix/ground_basis_bug

Merge pull request #28 from Climdyn/bug_fix/ground_basis_bug #44

Workflow file for this run

name: tests
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
checks:
strategy:
fail-fast: false
matrix:
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]
name: Python ${{ matrix.python-version }} on ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v3
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('environment.yml') }}
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-version: latest
use-mamba: true
activate-environment: qgs
environment-file: environment.yml
auto-activate-base: false
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- shell: bash -el {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
printenv | sort
- name: Run tests
shell: bash -el {0}
run: |
pytest
status:
if: ${{ always() }} && ${{ github.event_name == 'pull_request' }}
name: Pull Request Status
needs: checks
runs-on: ubuntu-latest
steps:
- name: Issue status
shell: bash
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/Climdyn/qgs/statuses/${{ github.event.pull_request.head.sha }} \
-d '{"state":"${{ needs.checks.result }}","target_url":"https://github.com/Climdyn/qgs/commit/${{ github.event.pull_request.head.sha }}","description":"qgs tests results","context":"PR-status"}'