-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (90 loc) · 3 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
on:
pull_request:
types: [opened, synchronize]
jobs:
ESLint-Evaluator:
runs-on: self-hosted
name: ESLint
steps:
- name: Fetch project repository
uses: actions/checkout@v2
- name: Fetch Blocked Files Checkout action
uses: actions/checkout@v2
with:
repository: betrybe/blocked-files-checkout-action
ref: v2
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/blocked-files-checkout
- name: Fetch ESLint evaluator
uses: actions/checkout@v2
with:
repository: betrybe/eslint-linter-action
ref: v3
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/eslint-evaluator
- name: Setup NodeJS
uses: actions/setup-node@v1.4.4
with:
node-version: '14'
- name: Restore protected files
uses: ./.github/actions/blocked-files-checkout
with:
restore_branch: 'master'
- name: Run ESLint evaluator
uses: ./.github/actions/eslint-evaluator
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ github.event.pull_request.number }}
Evaluator:
runs-on: self-hosted
name: Evaluator
needs: [ESLint-Evaluator]
services:
mongodb:
image: mongo
ports:
- "27017:27017"
options: -v ${{ github.workspace }}:/github/workspace
steps:
- name: Fetch project repository
uses: actions/checkout@v2
- name: Fetch Blocked Files Checkout action
uses: actions/checkout@v2
with:
repository: betrybe/blocked-files-checkout-action
ref: v2
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/blocked-files-checkout
- name: Fetch MongoDB Query evaluator
uses: actions/checkout@v2
with:
repository: betrybe/mongodb-query-evaluator-action
ref: v5.1
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/mongodb-query-evaluator
- name: Fetch Store evaluation
uses: actions/checkout@v2
with:
repository: betrybe/store-evaluation-action
ref: v4.2
token: ${{ secrets.GIT_HUB_PAT }}
path: .github/actions/store-evaluation
- name: Restore protected files
uses: ./.github/actions/blocked-files-checkout
with:
restore_branch: 'master'
- name: Run MongoDB Query evaluator
uses: ./.github/actions/mongodb-query-evaluator
id: mongodb_evaluator
env:
DBNAME: 'commerce'
with:
db_restore_dir: 'assets'
challenges_dir: 'challenges'
pr_author_username: ${{ github.event.pull_request.user.login }}
- name: Run Store evaluation
uses: ./.github/actions/store-evaluation
with:
evaluation-data: ${{ steps.mongodb_evaluator.outputs.result }}
environment: production
pr-number: ${{ github.event.pull_request.number }}