-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.3 KB
/
ci.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
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 18.14.0
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.3.0
with:
mongodb-version: 4.4.1
- run: yarn --cwd server install
- run: yarn --cwd server test
- name: Send slack notification
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Get current branch name
uses: ./.github/actions/branchName
id: vars
- name: Request deployment
uses: peter-evans/repository-dispatch@v1
with:
repository: mission-apprentissage/sirius-infra
token: ${{ secrets.DEVOPS_ACCESS_TOKEN }}
event-type: deploy
client-payload: '{"envName": "recette", "branchName":"develop"}'
if: steps.vars.outputs.branchName == 'develop'