-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (83 loc) · 2.44 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
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
name: Test
on:
push:
jobs:
test:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
server-token: 'local'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test
run: pnpm turbo:test
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: 'local'
TURBO_TEAM: 'local'
- name: Upload Playwright report
uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report
path: tests/e2e/playwright-report/
retention-days: 3
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
storybookBuildDir: packages/ui/storybook-static
storybookBaseDir: packages/ui
onlyChanged: true
exitOnceUploaded: true
- name: Deploy storybook to netlify
run:
pnpm run --filter=@custom/ui build && npx netlify-cli deploy --prod
--filter @custom/ui --dir=packages/ui/storybook-static
env:
VITEST_CLOUDINARY_CLOUDNAME: local
NETLIFY_SITE_ID: ${{ vars.NETLIFY_STORYBOOK_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
if:
${{ github.ref == 'refs/heads/dev' && vars.NETLIFY_STORYBOOK_ID != ''
}}
docker_build:
name: Docker Build
if: startsWith(github.ref_name, 'test-all/')
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2
bundler-cache: true
- name: Install Pygmy
run: gem install pygmy
- name: Start Pygmy
run: pygmy up
- name: Docker Build & Up
run: DOCKER_BUILDKIT=1 docker-compose up -d --build
- name: Wait a bit
run: sleep 5
- name: Check containers status
run: |
if docker-compose ps | grep Exit
then
echo "Docker container(s) exited"
exit 1
else
echo "Docker containers running"
fi