-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (43 loc) · 1.41 KB
/
tests.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
name: Run Tests
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
build:
name: Unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.17.0
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Create .env file
run: |
echo AUTH_SECRET=${{ secrets.AUTH_SECRET }} >> src/.env
echo TEST_PASSWORD=${{ secrets.TEST_PASSWORD }} >> src/.env
echo SENDGRID_RECOVERY=${{ secrets.SENDGRID_RECOVERY }} >> src/.env
echo SENDGRID_API_KEY=${{ secrets.SENDGRID_API_KEY }} >> src/.env
echo FROM_EMAIL=${{ secrets.FROM_EMAIL }} >> src/.env
- name: Create certificate and key with certs folder
run: |
mkdir src/certs
openssl req -x509 -newkey rsa:4096 -keyout src/certs/key.pem -out src/certs/cert.pem -days 365 -nodes -subj "/C=US/ST=CA/L=San Francisco/O=Localhost/OU=Localhost/CN=localhost"
- name: Install dependencies for the frontend
run: bun install
working-directory: src
- name: Run Frontend Tests
run: bun run test:coverage
working-directory: src
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}