-
Notifications
You must be signed in to change notification settings - Fork 153
33 lines (29 loc) · 1.37 KB
/
main.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
name: Covey.Town CI
on: # Controls when the action will run.
# Triggers the workflow on push or pull request events but only for the master branch. If you want to trigger the action on other branches, add here
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-test: #
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Build and test backend service
env: # Pass the Twilio secrets into environmental variables for the backend tests to use
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
TWILIO_API_AUTH_TOKEN: ${{ secrets.TWILIO_API_AUTH_TOKEN }}
TWILIO_API_KEY_SECRET: ${{ secrets.TWILIO_API_KEY_SECRET }}
TWILIO_API_KEY_SID: ${{ secrets.TWILIO_API_KEY_SID }}
run: cd townService; npm install && npm run prestart && npm run lint && npm test
- name: Build and test frontend components
run: cd frontend; npm install && npm run prestart && npm run lint && npm test