From 870d6643c8517fc277076c737a93f4bc565b4dae Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:20:30 +0200 Subject: [PATCH 1/2] Lint on GitHub Actions --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..e535eb6f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: Lint + +on: [push, pull_request, workflow_dispatch] + +env: + FORCE_COLOR: 1 + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - uses: tox-dev/action-pre-commit-uv@v1 From 6486da85fb30d6a63d3e6b2b52df2d9f7be2a8e3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:40:27 +0200 Subject: [PATCH 2/2] Test on GitHub Actions with tox-uv --- .github/workflows/ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87ac5396..983a11fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,15 +2,16 @@ name: Tests on: [push, pull_request, workflow_dispatch] +permissions: + contents: read + env: FORCE_COLOR: 1 jobs: test: name: Python ${{ matrix.python-version }} - runs-on: ubuntu-latest - strategy: fail-fast: false matrix: @@ -18,21 +19,27 @@ jobs: steps: - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 id: python-install with: python-version: ${{ matrix.python-version }} - cache: pip + allow-prereleases: true + + - name: Install uv + uses: hynek/setup-cached-uv@v2 + with: cache-dependency-path: | requirements.txt dev-requirements.txt - allow-prereleases: true - - name: Install tox + + - name: Tox tests run: | - python -m pip install tox - - name: Run Tests - run: tox -e py + uvx --with tox-uv tox -e py + - uses: codecov/codecov-action@v4 if: always() with: