From d814d3ad857fdf6d04a490623eded02a2422ba73 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:39:43 -0800 Subject: [PATCH 1/7] add ruff lint step to workflow --- .github/workflows/main.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7bac4a1..b358214 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,10 +23,23 @@ jobs: - name: Run tests run: scripts/test + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: ruff check + run: uv run ruff check bson/ + # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: if: always() - needs: [test] + needs: + - test + - lint runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From e67e42e81f9cb27dd124503c9c9c578219dbf1be Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:43:42 -0800 Subject: [PATCH 2/7] uv add ruff before using it. --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b358214..fe39797 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,9 @@ jobs: uses: astral-sh/setup-uv@v4 - name: ruff check - run: uv run ruff check bson/ + run: + - uv add ruff + - uv run ruff check bson/ # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: From bd1f60099177976d95d235deee07a4c9befc63e3 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:47:32 -0800 Subject: [PATCH 3/7] fix syntax for running ruff --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe39797..bbf9e36 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,11 +30,10 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v4 + run: uv add ruff - name: ruff check - run: - - uv add ruff - - uv run ruff check bson/ + run: uv run ruff check bson/ # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: From 5b403a754f5edb1bd7d9737da930cff001dffe9e Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:48:54 -0800 Subject: [PATCH 4/7] put the needs check back the way it was. --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bbf9e36..5b0f8fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,9 +38,9 @@ jobs: # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: if: always() - needs: - - test - - lint + needs: [test] +# - test +# - lint runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From d19d178cd9bb06666f92b35a8c33d47ade9096f2 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:50:12 -0800 Subject: [PATCH 5/7] removed lint step to see if it works again. --- .github/workflows/main.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5b0f8fb..6e8d088 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,17 +23,17 @@ jobs: - name: Run tests run: scripts/test - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + # lint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 - - name: Install uv - uses: astral-sh/setup-uv@v4 - run: uv add ruff + # - name: Install uv + # uses: astral-sh/setup-uv@v4 + # run: uv add ruff - - name: ruff check - run: uv run ruff check bson/ + # - name: ruff check + # run: uv run ruff check bson/ # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: From cce07ae09a34982b0b90b667a223382a610b84fe Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:51:59 -0800 Subject: [PATCH 6/7] ng lint stanza back in. --- .github/workflows/main.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e8d088..6bec4ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,17 +23,17 @@ jobs: - name: Run tests run: scripts/test - # lint: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - # - name: Install uv - # uses: astral-sh/setup-uv@v4 + - name: Install uv + uses: astral-sh/setup-uv@v4 # run: uv add ruff - # - name: ruff check - # run: uv run ruff check bson/ + - name: ruff check + run: uv run --with ruff ruff check bson/ # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: From 1f7d84be89a9e25ac9d786fcdd7dc181c53afb46 Mon Sep 17 00:00:00 2001 From: Chris Barker Date: Thu, 19 Dec 2024 22:54:07 -0800 Subject: [PATCH 7/7] added lint to check --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bec4ee..b05873a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: # https://github.com/marketplace/actions/alls-green#why used for branch protection checks check: if: always() - needs: [test] + needs: [test, lint] # - test # - lint runs-on: ubuntu-latest