Skip to content

Commit

Permalink
ci: speed up testing
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 22, 2024
1 parent 6d4526e commit 2ecdf03
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
name: deploy

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- v*

jobs:
deploy:
dist:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2

- name: Set up Python
uses: actions/setup-python@v5
deploy:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
python-version: '3.11'

- name: Install dependencies for build
run: pip install --upgrade setuptools build

- name: Build
run: python -m build
name: Packages
path: dist

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

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

- name: Install test dependencies
run: pip install tox tox-gh-actions
run: uv tool install --with tox-gh-actions --with tox-uv tox

- name: Test packaging
run: tox -e pkg
Expand All @@ -57,7 +59,12 @@ jobs:

post-test:
name: All tests passed
if: always()
needs: [test]
runs-on: ubuntu-latest
needs: test
timeout-minutes: 2
steps:
- run: echo ok
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

0 comments on commit 2ecdf03

Please sign in to comment.