Skip to content

Commit

Permalink
first action test with ruff and build
Browse files Browse the repository at this point in the history
  • Loading branch information
rveachkc committed Jan 7, 2025
1 parent 4b4c1b9 commit f4f196f
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Python package

on:
push:
pull_request:

jobs:
test:
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
run: uv python install

- name: Install the project
run: uv sync --all-extras --dev

# - name: Run tests
# run: uv run pytest tests --junit-xml=test-results.xml

# - name: Upload test results
# uses: actions/upload-artifact@v4
# with:
# name: pytest-results
# path: test-results.xml

- name: Run Ruff
run: uv run ruff check . --output-file ruff-results.xml --output-format junit

- name: Upload ruff results
uses: actions/upload-artifact@v4
with:
name: ruff-results
path: ruff-results.xml

build:

name: build distribution
runs-on: ubuntu-latest

needs:
- test

steps:
- uses: actions/checkout@v4

- run: git fetch --tags

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Build dist
run: uv build

- name: built artifacts
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

0 comments on commit f4f196f

Please sign in to comment.