Skip to content

Update python packages to fix dependabot alerts #9

Update python packages to fix dependabot alerts

Update python packages to fix dependabot alerts #9

on:
workflow_dispatch:
push:
branches: [ "master", "main" ]
pull_request:
release:
types: [published]
permissions:
contents: write
env:
POETRY_CACHE_DIR: ~/.cache/pypoetry
jobs:
run:
strategy:
matrix:
args:
- host: ubuntu-22.04
- host: macos-14
runs-on: ${{ matrix.args.host }}
env:
LOGLEVEL: info
steps:
- name: Checkout the PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Debug
run: |
echo "github.event_name:" ${{ github.event_name }}
echo "github.event.pull_request.head.sha:" ${{ github.event.pull_request.head.sha }}
echo "github.sha:" ${{ github.sha }}
echo "github.event.release.tag_name:" ${{ github.event.release.tag_name }}
echo "contains(github.event.pull_request.labels, 'ci:upload-binaries'):" ${{ contains(github.event.pull_request.labels, 'ci:"upload-binaries') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Poetry Action
run: python -m pip install poetry==1.4.0
- name: Print Poetry version
run: poetry --version
- name: List Current Directory
run: ls
- name: Install
run: poetry install
- name: Print Python Information
run: |
which python
pip freeze
- name: Test
run: poetry run pytest
- name: Lint
run: poetry run flake8 src/
- name: Typecheck
run: poetry run mypy -p signaloid
- name: Build
run: poetry build
- name: Upload test logs
uses: actions/upload-artifact@v4
if: always()
with:
name: "test-logs-${{matrix.args.host}}-${{ github.event.pull_request.head.sha || github.sha }}"
path: |
./src/signaloid/distributional_information_plotting/tests/testdata/Brown-Ham-model-actual-results_df.csv
- name: Upload wheels
if: ${{ startsWith(matrix.args.host, 'ubuntu') }}
uses: actions/upload-artifact@v4
with:
name: "wheel-${{ github.event.pull_request.head.sha || github.sha }}"
path: |
./dist/*
- name: Upload to release
if: ${{ github.event_name == 'release' && startsWith(matrix.args.host, 'ubuntu') }}
run: gh release create "v${{ github.event.release.tag_name }}" dist/*
env:
GH_TOKEN: ${{ github.token }}