Skip to content

v1.0.2

v1.0.2 #25

Workflow file for this run

name: Release to PyPi
on:
workflow_dispatch:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.3"]
corsika-version: ["77550"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install dependencies
run: |
pdm sync -d -G hdf
- name: Cache Corsika7
id: cache-corsika
uses: actions/cache@v3
env:
cache-name: cache-corsika
with:
path: corsika-${{ matrix.corsika-version }}/run
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.corsika-version }}-${{ hashFiles('admin/config.h') }}
- name: Install CORSIKA7
run: admin/download_corsika.sh
env:
CORSIKA_PW: ${{ secrets.CORSIKA_PW }}
CORSIKA_VERSION: ${{ matrix.corsika-version }}
- name: Run Tests
run: |
pdm run -v coverage run --include="panama/**" -m pytest
- name: Produce coverage xml
run: pdm run -v coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Deploy to PyPi
run: pdm publish