Skip to content

Fix dependency installation #2

Fix dependency installation

Fix dependency installation #2

Workflow file for this run

name: Test, build and create releases.
on:
push:
branches:
- 'main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- 'main'
workflow_dispatch:
jobs:
test:
name: Test project
strategy:
matrix:
os:
- "windows-latest"
- "ubuntu-latest"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pdm
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: pdm install --dev ${{ matrix.os != 'windows-latest' && '--group=uvloop' || '' }}
- name: Test project
run: pdm run pytest
build-and-release:
name: Build project and release if needed
runs-on: "ubuntu-latest"
needs: "test"
permissions:
contents: "write"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pdm
uses: pdm-project/setup-pdm@v4
- name: Install dependencies
run: pdm install --dev --group=uvloop
- name: Build project
run: pdm build
- name: Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: "dist/*"
generate_release_notes: true
fail_on_unmatched_files: true