forked from primer/primitives
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 2.07 KB
/
consumer_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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Consumer test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
TEST_FOLDER: primer-brand
jobs:
changes:
uses: ./.github/workflows/hasChanged.yml
test:
needs: changes
if: ${{ github.repository == 'primer/primitives' && needs.changes.outputs.outputAffected == 'true' }}
name: Primer Brand
runs-on: ubuntu-latest
steps:
- run: |
echo "Re-enable this workflow when primer/brand has been updated to usev8 tokens"
# - name: Checkout current repo
# uses: actions/checkout@v4
# - name: Checkout Primer Brand repo
# uses: actions/checkout@v4
# with:
# repository: primer/brand
# path: ${{env.TEST_FOLDER}}
# - name: Set up Node
# uses: actions/setup-node@v4
# with:
# node-version: 20
# - name: Caching dependencies
# uses: actions/cache@v4
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Install local dependencies
# run: npm install --legacy-peer-deps --ignore-scripts
# - name: Install consumer dependencies (reference)
# run: pushd ${{env.TEST_FOLDER}}; npm install --legacy-peer-deps; popd
# - name: Build and pack
# run: npm pack
# - name: Retrieving package version
# id: package-version
# uses: martinbeentjes/npm-get-version-action@main
# - name: Installing local build
# run: |
# cd ${{env.TEST_FOLDER}}
# cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./
# cp ../primer-primitives-${{ steps.package-version.outputs.current-version}}.tgz ./packages/design-tokens
# npm install primer-primitives-${{steps.package-version.outputs.current-version}}.tgz --workspace packages/design-tokens
# - name: Build consumer tokens
# run: pushd ${{env.TEST_FOLDER}}; npm run build --workspace=packages/design-tokens; popd