-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.33 KB
/
node.js.yml
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
name: CI - Test, Lint and Coveralls Coverage
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
services:
postgres:
image: bitnami/postgresql
ports:
- 5432
steps:
- uses: actions/checkout@v3
- name: Generate .env file
run: |
touch .env
echo "DATABASE_URL=${{ secrets.DATABASE_URL }}" >> .env
echo "MAIL_LOGIN=${{ secrets.MAIL_LOGIN }}" >> .env
echo "MAIL_PASSWORD=${{ secrets.MAIL_PASSWORD }}" >> .env
echo "POSTGRESQL_USERNAME=${{ secrets.POSTGRESQL_USERNAME }}" >> .env
echo "POSTGRESQL_PASSWORD=${{ secrets.POSTGRESQL_PASSWORD }}" >> .env
echo "POSTGRESQL_DATABASE=${{ secrets.POSTGRESQL_DATABASE }}" >> .env
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Fixing non-standard Scripts
run: npm run lint
- name: Generate Jest Coverage
run: npm run test:ci
- name: Run Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}