-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (70 loc) · 2.02 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
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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run lint
run: yarn lint
'E2E_Tests':
runs-on: ubuntu-latest
services:
verdaccio:
image: verdaccio/verdaccio:4.0.0
ports:
- 4873:4873
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Verdaccio login
run: |
npx npm-cli-adduser \
-u username \
-p pass \
-e [email protected] \
-r http://localhost:4873 || true
- name: Configure git
run: |
git config --global user.name 'Verdaccio User'
git config --global user.email '[email protected]'
- name: Get changed packages
id: changed-packages
run: |
changed_packages=$(yarn -s lerna list --since | sed 's/$/\@0.0.0-verdaccio/' | xargs echo)
echo "::set-output name=PACKAGES::$changed_packages"
- name: Publish packages
run: |
yarn lerna publish \
'0.0.0-verdaccio' \
--registry http://localhost:4873 \
--no-git-tag-version \
--no-push \
--yes
- uses: actions/setup-node@v1
with:
node-version: '14'
- name: Install dependencies
run: yarn --cwd fixtures/app install --no-lockfile
- name: Install packages and run test
if: steps.changed-packages.outputs.PACKAGES
run: |
yarn --cwd fixtures/app add \
--registry http://localhost:4873 \
-D ${{ steps.changed-packages.outputs.PACKAGES }}
yarn --cwd fixtures/app test