This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (59 loc) · 1.98 KB
/
server.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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Server CI
run-name: ${{ github.actor }} is making deploy 🚀 Let's pray he will pass tests 😉
on:
push:
branches:
- dev-nextjs
paths:
- "server/**"
pull_request:
branches:
- dev-nextjs
paths:
- "server/**"
jobs:
init:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [17.x]
steps:
- uses: actions/checkout@v3
- name: 🚧 Starting Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: 🪖 Creating .dev.env for nodemailer/aws
working-directory: ./server
run: |
touch .dev.env
echo API_URL=${{ secrets.API_URL }} >> .dev.env
echo SMTP_HOST=${{ secrets.SMTP_HOST }} >> .dev.env
echo SMTP_USER=${{ secrets.SMTP_USER }} >> .dev.env
echo SMTP_PASS=${{ secrets.SMTP_PASS }} >> .dev.env
echo SMTP_PORT=${{ secrets.SMTP_PORT }} >> .dev.env
echo AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }} >> .dev.env
echo AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} >> .dev.env
echo AWS_S3_REGION=${{ secrets.AWS_S3_REGION }} >> .dev.env
echo AWS_S3_BUCKET=${{ secrets.AWS_S3_BUCKET }} >> .dev.env
cat .dev.env
- name: 🎧 Install modules
working-directory: ./server
run: npm install
- name: 🚀 Run linting
working-directory: ./server
run: npm run lint
- name: Run Prettier formatter
working-directory: ./server
run: npm run format
- name: 🚀 Run unit tests
working-directory: ./server
run: npm run test
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: 🚀 Run coverage tests
working-directory: ./server
run: npm run test:cov
- name: Run build
working-directory: ./server
run: npm run build
- run: echo "😼 Finished! Good job."