-
Notifications
You must be signed in to change notification settings - Fork 71
53 lines (52 loc) · 1.75 KB
/
Copy pathjest.yml
File metadata and controls
53 lines (52 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This workflow will do a clean installation of node dependencies, cache/restore them,
# build the source code and run tests across different versions of node.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Jest Tests
on:
push:
pull_request:
jobs:
jest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18]
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
MM_DEV: 1
MAILING_DATABASE_URL_TEST: postgresql://postgres:postgres@localhost:5432/mailing_cli_test
WEB_DATABASE_URL_TEST: postgresql://postgres:postgres@localhost:5432/mailing_test
MAILING_WEB_SESSION_PASSWORD: test-YEAed65EasPz7zbGF4fuoMTDka7C
MAILING_SESSION_PASSWORD: test-5toTch6whgDvErN1nPg0hbDq6Do6
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install dependencies
run: yarn
- name: Build the app
run: yarn build
- name: Run CI tests
run: yarn ci:test
- name: Run CI Integration tests
run: yarn ci:test:integration