Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests
name: Deploy

on: [push]

Expand All @@ -8,18 +8,9 @@ env:
ECR_REPOSITORY: discovery-api

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: npm install
run: npm ci
- name: Unit Tests
run: npm test
run_tests:
name: Run Tests
uses: ./.github/workflows/tests.yml

deploy:
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run Smoke Tests

on:
workflow_run:
workflows: ["Unit tests / deploy"]
workflows: ["Deploy"]
types:
- completed

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Unit Tests

on: [push]

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node version
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: npm install
run: npm ci
- name: Unit Tests
run: npm test
Comment on lines +10 to +20
Loading