forked from TEAMMATES/teammates
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (97 loc) · 2.92 KB
/
component.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
name: Component Tests
on:
push:
branches:
- master
- release
pull_request:
branches:
- master
- release
schedule:
- cron: "0 0 * * *" #end of every day
jobs:
lint:
strategy:
fail-fast: false #ensure both tests run even if one fails
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache eslint
uses: actions/cache@v2
with:
path: |
./.eslintcache
key: ${{ runner.os }}-eslint-${{ hashFiles('.eslintcache') }}
restore-keys: |
${{ runner.os }}-eslint-
- name: Cache stylelint
uses: actions/cache@v2
with:
path: |
./.stylelintcache
key: ${{ runner.os }}-stylelint-${{ hashFiles('.stylelintcache') }}
restore-keys: |
${{ runner.os }}-stylelint-
- name: Run Backend Linting
run: ./gradlew lint --continue
- name: Install Frontend Dependencies
run: npm ci
- name: Run Lint Checks
run: npm run lint
component-testing:
strategy:
fail-fast: false #ensure both tests run even if one fails
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Update Property File
run: mv src/test/resources/test.ci-${{ matrix.os }}.properties src/test/resources/test.properties
- name: Run Solr search service
if: matrix.os == 'ubuntu-latest' # Docker does not work well on Windows env
run: docker-compose run -d -p 8983:8983 solr
- name: Run Backend Tests
run: |
./gradlew createConfigs componentTests
./gradlew jacocoReport
- name: Generate Types
run: ./gradlew generateTypes
- name: Install Frontend Dependencies
run: npm ci
- name: Run Frontend Tests
run: npm run coverage
- name: Upload to Codecov
if: matrix.os == 'ubuntu-latest' #only upload to codecov on ubuntu VM
uses: codecov/codecov-action@v3