Skip to content

.

. #25

Workflow file for this run

on:
push:
workflow_dispatch: null
name: CI
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: nicknovitski/nix-develop@v1
- name: Lint with flake8
run: |
flake8 --version
flake8
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: nicknovitski/nix-develop@v1
- name: Build
run: |
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: nicknovitski/nix-develop@v1
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: mxschmitt/action-tmate@v3
- name: Integration tests
run: |
pytest -s
debug-release:
name: Create Release
runs-on: ubuntu-latest
environment: release
needs: [lint, test]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- run: |
find .
#- name: Publish to PyPi
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/-publish@release/v1
# release:
# name: Create Release
# runs-on: ubuntu-latest
# if: ${{ startsWith(github.ref, 'refs/tags/v') }}
# environment: release
# needs: [lint, test]
# permissions:
# id-token: write
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: dist
# path: dist
# - name: Publish to PyPi
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/-publish@release/v1