Skip to content

Bump up to version 1.2 #4

Bump up to version 1.2

Bump up to version 1.2 #4

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-20.04
- host: macos-14
runs-on: ${{ matrix.args.host }}
env:
LOGLEVEL: info
steps:
- uses: actions/checkout@v3
- 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@v3
with:
python-version: "3.11"
- name: Install Poetry Action
uses: snok/[email protected]
- 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@v3
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@v3
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') }}
uses: svenstaro/upload-release-action@v2
with:
file: dist/*
# https://github.com/svenstaro/upload-release-action/issues/111#issuecomment-1794377222
tag: "${{ github.event.release.tag_name }}"
file_glob: true