-
Notifications
You must be signed in to change notification settings - Fork 2.1k
77 lines (65 loc) · 2.29 KB
/
ci-integrations.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
name: Continous Integration
on:
workflow_call:
secrets:
VERDACCIO_AUTH_TOKEN:
required: false
inputs:
enterprise:
description: "Flag to use enterprise registry"
type: boolean
required: false
default: false
jobs:
run-ci:
name: Run CI
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
timeout-minutes: 120
steps:
- name: Expose github environment as shell variables
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}
VARS_CONTEXT: ${{ toJson(vars) }}
run: |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
to_envs() { jq -r "to_entries[] | \"\(.key)<<$EOF\n\(.value)\n$EOF\n\""; }
echo "$SECRETS_CONTEXT" | to_envs >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: ${{ inputs.enterprise && 'https://registrynpm.storefrontcloud.io' || '' }}
cache: yarn
- run: yarn install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_AUTH_TOKEN }}
HUSKY: 0
- name: Detect circular dependencies 🔄
uses: vuestorefront/vue-storefront/actions/circular-dependencies@main
with:
filesPath: 'packages/**/*.{ts,vue}'
- name: Check licenses 🧪
uses: vuestorefront/vue-storefront/actions/check-licenses@main
with:
projectPath: ${{ github.workspace }}
- name: Cache turbo build setup
uses: actions/cache@v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- run: yarn ci
- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ runner.os }}-${{ github.event.pull_request.head.sha }}
overwrite: true
path: |
coverage
packages/**/coverage