mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
test: add test for template
This commit is contained in:
parent
87a775aca2
commit
8178579a7f
1 changed files with 38 additions and 0 deletions
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
|
@ -47,10 +47,48 @@ jobs:
|
|||
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
|
||||
- run: nix build -L ".#${{ matrix.attr }}" --keep-going
|
||||
|
||||
test-template:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v23
|
||||
- uses: cachix/cachix-action@v12
|
||||
with:
|
||||
name: poetry2nix
|
||||
signingKey: "VhaWuN3IyJVpWg+aZvTocVB+W8ziZKKRGLKR53Pkld3YRZxYOUfXZf0fvqF+LkqVW0eA60trVd5vsqNONpX9Hw=="
|
||||
|
||||
- name: create flake template test directory
|
||||
run: echo "TESTDIR=$(mktemp -d)" >> "$GITHUB_ENV"
|
||||
|
||||
- name: initialize flake from poetry2nix template
|
||||
working-directory: ${{ env.TESTDIR }}
|
||||
run: nix flake init --template poetry2nix
|
||||
|
||||
- name: generate pyproject.toml
|
||||
working-directory: ${{ env.TESTDIR }}
|
||||
run: nix develop -c poetry init --name=poetry2nix-template-test --quiet
|
||||
|
||||
- name: generate poetry.lock
|
||||
working-directory: ${{ env.TESTDIR }}
|
||||
run: nix develop -c poetry lock --no-update
|
||||
|
||||
- name: build the flake
|
||||
working-directory: ${{ env.TESTDIR }}
|
||||
run: nix build --keep-going -L --show-trace
|
||||
|
||||
|
||||
|
||||
collect:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- nix-build
|
||||
- sort-build-systems
|
||||
- test-template
|
||||
steps:
|
||||
- run: exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue