From 7ffe9d9b2245108daeac9bd46991ac4516d3a95c Mon Sep 17 00:00:00 2001 From: Michael D'Angelo Date: Tue, 3 Oct 2023 17:04:21 -0400 Subject: [PATCH 1/3] update ci triggers --- .github/workflows/lint.yml | 7 +++++++ .github/workflows/test.yml | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f6af5126..1fa18fa1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,15 @@ name: lint on: push: + branches: + - main pull_request: workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a97e7f6c..513dc89a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,11 @@ name: test on: workflow_call: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: @@ -14,7 +19,9 @@ jobs: node-version-file: '.nvmrc' cache: 'npm' - run: npm ci - - name: run tests + - name: run unit tests + run: npx jest + - name: run frontend tests uses: cypress-io/github-action@v6 with: start: npm start From 14bf7823c8342f4bc395fbf2326035ead953ece7 Mon Sep 17 00:00:00 2001 From: Michael D'Angelo Date: Tue, 3 Oct 2023 17:05:28 -0400 Subject: [PATCH 2/3] add timeouts --- .github/workflows/deploy-preview.yml | 1 + .github/workflows/lint.yml | 1 + .github/workflows/main.yml | 1 + .github/workflows/share-preview-url.yml | 1 + .github/workflows/stale.yml | 1 + .github/workflows/test.yml | 1 + 6 files changed, 6 insertions(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index c4e77357..1a9f6718 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -12,6 +12,7 @@ jobs: deploy-preview: needs: [test] runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - name: set node version diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1fa18fa1..513984ae 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,6 +13,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - name: set node version diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 039b4f40..2a63888a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,7 @@ jobs: deploy: needs: [test] runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - name: set node version diff --git a/.github/workflows/share-preview-url.yml b/.github/workflows/share-preview-url.yml index 2943af52..35392be3 100644 --- a/.github/workflows/share-preview-url.yml +++ b/.github/workflows/share-preview-url.yml @@ -9,6 +9,7 @@ jobs: comment-on-pr: runs-on: ubuntu-latest permissions: write-all + timeout-minutes: 5 steps: - uses: actions/checkout@v4 - name: get dest dir diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b4572d36..17e97945 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,6 +6,7 @@ on: jobs: stale: runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/stale@v7 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 513dc89a..b73e8be5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ concurrency: jobs: test: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - name: checkout code, and install dependencies uses: actions/checkout@v4 From 61e2fd3eb22ae6f2514effce6e64e0de8593da3b Mon Sep 17 00:00:00 2001 From: Michael D'Angelo Date: Tue, 3 Oct 2023 17:05:58 -0400 Subject: [PATCH 3/3] remove command --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b73e8be5..f2a80db2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,8 +20,6 @@ jobs: node-version-file: '.nvmrc' cache: 'npm' - run: npm ci - - name: run unit tests - run: npx jest - name: run frontend tests uses: cypress-io/github-action@v6 with: