From bcc7454d9fc3cc69eff67c6f3ee4139ffe86188c Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sat, 24 Aug 2024 15:38:58 +0100 Subject: [PATCH 1/4] Add a test workflow --- .github/workflows/tests.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..6f15c73 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +--- +name: Tests +on: + push: + branches: + - master + pull_request: + branches: + - master + + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: eifinger/setup-rye@v4.2.0 + id: setup-rye + with: + version: "0.39.0" + - name: Run formatting check + run: rye fmt --check + - name: Run linters + run: rye lint + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + + steps: + - uses: actions/checkout@v4 + - uses: eifinger/setup-rye@v4.2.0 + - name: Install Python ${{ matrix.python-version }} + run: rye pin ${{ matrix.python-version }} + - name: Run tests + run: rye test From dea4e33712f55d69c24479064010fadf8780a262 Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sat, 24 Aug 2024 15:48:34 +0100 Subject: [PATCH 2/4] Bump action version --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f15c73..7572e6b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: eifinger/setup-rye@v4.2.0 + - uses: eifinger/setup-rye@v4.2.3 id: setup-rye with: version: "0.39.0" @@ -37,7 +37,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: eifinger/setup-rye@v4.2.0 + - uses: eifinger/setup-rye@v4.2.3 - name: Install Python ${{ matrix.python-version }} run: rye pin ${{ matrix.python-version }} - name: Run tests From c27d93e5bb442a50e364400e7898a71b12d7488b Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sat, 24 Aug 2024 15:55:06 +0100 Subject: [PATCH 3/4] This is driving me daft --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7572e6b..06a22e9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,8 @@ jobs: id: setup-rye with: version: "0.39.0" + enable-cache: true + cache-prefix: "rye-lint" - name: Run formatting check run: rye fmt --check - name: Run linters From 7a6a39d9364ed323cfebefbbf58759c761f08e6f Mon Sep 17 00:00:00 2001 From: Keith Gaughan Date: Sat, 24 Aug 2024 15:59:23 +0100 Subject: [PATCH 4/4] Try a different action --- .github/workflows/tests.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 06a22e9..f6931fd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,12 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: eifinger/setup-rye@v4.2.3 - id: setup-rye - with: - version: "0.39.0" - enable-cache: true - cache-prefix: "rye-lint" + - uses: sksat/setup-rye@v0.28.0 - name: Run formatting check run: rye fmt --check - name: Run linters @@ -39,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: eifinger/setup-rye@v4.2.3 + - uses: sksat/setup-rye@v0.28.0 - name: Install Python ${{ matrix.python-version }} run: rye pin ${{ matrix.python-version }} - name: Run tests