Feat:cancel previous actions on push (#707)

This commit is contained in:
Philip Korsholm authored and GitHub committed 2021-11-03 13:16:12 +01:00
1 parent e82737a035
commit 649d8d34aa
1 file changed
+19 -9
+19 -9
View File
@@ -3,8 +3,13 @@ on: [push, pull_request]
jobs: jobs:
unit-tests: unit-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v2.3.5
with: with:
@@ -13,8 +18,8 @@ jobs:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2.4.1 uses: actions/setup-node@v2.4.1
with: with:
node-version: '14' node-version: "14"
cache: 'yarn' cache: "yarn"
- name: Assert changed - name: Assert changed
run: ./scripts/assert-changed-files-actions.sh "packages" run: ./scripts/assert-changed-files-actions.sh "packages"
@@ -28,9 +33,9 @@ jobs:
run: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 run: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1
integration-tests: integration-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
postgres: postgres:
image: postgres image: postgres
env: env:
@@ -44,7 +49,12 @@ jobs:
ports: ports:
- 5432:5432 - 5432:5432
steps: steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
access_token: ${{ github.token }}
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.5 uses: actions/checkout@v2.3.5
with: with:
@@ -53,8 +63,8 @@ jobs:
- name: Setup Node.js environment - name: Setup Node.js environment
uses: actions/setup-node@v2.4.1 uses: actions/setup-node@v2.4.1
with: with:
node-version: '14' node-version: "14"
cache: 'yarn' cache: "yarn"
- name: Bootstrap packages - name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap uses: ./.github/actions/cache-bootstrap