-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (37 loc) · 1.36 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
name: Run tests
on:
pull_request:
push:
branches:
- develop
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Build and install the CLI
run: |
yarn install --frozen-lockfile
yarn global:install
echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Generate the theme
run: yarn concurrently --group "figma2theme generate-json --latest-changes" "figma2theme generate-chakra --latest-changes" "figma2theme generate-tailwind --latest-changes"
env:
FIGMA_API_KEY: ${{secrets.FIGMA_API_KEY}}
- name: Archive the theme
uses: actions/upload-artifact@v2
with:
name: theme
path: |
./tokens.json
./theme
./tailwind.figma2theme.js
- name: Test, lint and typecheck the project and build Storybook
run: yarn concurrently --group "yarn:test" "yarn:lint" "yarn:typecheck" "yarn:build-storybook"
- name: Serve Storybook and run tests
run: yarn concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "yarn http-server storybook-static --port 6006 --silent" "yarn wait-on http://127.0.0.1:6006 && yarn test-storybook --url http://127.0.0.1:6006"