forked from UI5/webcomponents-react
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 2.77 KB
/
main.yml
File metadata and controls
96 lines (81 loc) · 2.77 KB
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
# This is a basic workflow to help you get started with Actions
name: CI
on: [push, pull_request]
jobs:
check-bundle-size:
if: ${{ github.base_ref == 'main' }} # only for PRs targeting main branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 1
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
- uses: preactjs/compressed-size-action@2.3.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: 'packages/**/dist/**/*.js'
exclude: 'packages/**/src/dist/**'
compression: 'gzip'
deploy-master-docs:
if: ${{ github.repository == 'SAP/ui5-webcomponents-react' }}
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2.3.4
with:
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.0
with:
node-version: 14.x
- name: Install and Build
run: |
yarn install
yarn build:storybook
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
# token: ${{ secrets.ACCESS_TOKEN }} # maybe the default github access token is now sufficient?
branch: gh-pages # The branch the action should deploy to.
folder: .out # The folder the action should deploy.
target-folder: master
clean: true
if: ${{ github.ref == 'refs/heads/main' }}
test-and-build:
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') && (github.event_name == 'push' || github.base_ref == 'main') }}
name: 'Install, Test & Build'
runs-on: ubuntu-latest
strategy:
matrix:
react-version: [16.8.0, 16.14.0, ^17.0.0]
env:
CI: true
steps:
- uses: actions/checkout@v2.3.4
- name: Use Node.js
uses: actions/setup-node@v2.4.0
with:
node-version: 14
- name: install dependencies - React ${{ matrix.react-version }}
run: |
node --experimental-json-modules scripts/ci/set-react-resolution.mjs ${{ matrix.react-version }}
yarn install
- name: run tests
run: yarn test --runInBand
- name: Coveralls
# only collect coverage information on latest react version
if: matrix.react-version == '^17.0.0'
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: build project
run: yarn build
reuse-compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1.1