-
-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (44 loc) · 1.4 KB
/
test.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
name: Build & run all tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install dependencies # Install all deps
run: yarn
- name: Sync versions # Sync versions
run: yarn syncprojects
- name: Build ngx-translate-cut # Build
run: yarn build
- name: Build Example # Build Example page
run: yarn build:demo --base-href https://bartholomej.github.io/ngx-translate-cut/
- name: Run tests # Build Schematics and move
run: yarn test --configuration=ci --code-coverage
- name: Upload coverage reports
run: bash <(curl -s https://codecov.io/bash)
- name: Deploy Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./dist/demo