From 17cece99b0f03a8f99690fc70081470dd4d5f8f2 Mon Sep 17 00:00:00 2001 From: franekmagiera Date: Sun, 11 Feb 2024 19:36:23 +0100 Subject: [PATCH] Include more checks in the deploy workflow Looks like workflow_on is not supported by one of the deno actions. So I can't use it for the deploy workflow to depend on the test workflow. This introduces some duplication but I care more about not deploying when tests are failing and that much duplication is fine for me for the time being. --- .github/workflows/deploy.yaml | 15 ++++++++++----- .github/workflows/test.yaml | 6 +++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index e0e908d..7647f42 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,17 +1,13 @@ name: Deploy on: - workflow_run: - workflows: [Test] + push: branches: [main] - types: [completed] jobs: deploy: name: Deploy runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' }} - permissions: id-token: write # Needed for auth with Deno Deploy contents: read # Needed to clone the repository @@ -24,6 +20,15 @@ jobs: uses: denoland/setup-deno@v1 with: deno-version: v1.39.4 + + - name: Check formatting + run: "deno fmt --check" + + - name: Lint + run: "deno lint" + + - name: Test + run: "deno task test" - name: Build step run: "deno task build" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 322d57d..530683f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,9 +21,9 @@ jobs: - name: Check formatting run: "deno fmt --check" - + - name: Lint - run: "deno lint" - + run: "deno lint" + - name: Test run: "deno task test"