-
Notifications
You must be signed in to change notification settings - Fork 129
84 lines (81 loc) · 3.67 KB
/
playwright.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Cosmos 5 Playwright Tests
# Only run on a push to master to avoid running for all the dependabot PRs
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
cosmos-build-test-scan:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: cosmos-control.sh build
# This `shell` line is required to get around a known issue: https://github.com/actions/runner/issues/241#issuecomment-745902718
shell: 'script -q -e -c "bash {0}"'
run: ./cosmos-control.sh build
- uses: actions/setup-node@v3
with:
node-version: "14"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"
- name: Install playwright dependencies
run: yarn; yarn playwright install --with-deps
working-directory: playwright
- name: Check for test.only
run: yarn playwright test --list --forbid-only
working-directory: playwright
- name: cosmos-control.sh run
# This `shell` line is required to get around a known issue: https://github.com/actions/runner/issues/241#issuecomment-745902718
shell: 'script -q -e -c "bash {0}"'
run: ./cosmos-control.sh run
# Allow the containers to spin up
- name: Sleep for 2min
run: sleep 120s
shell: bash
# Ensure we're connected and running
- name: Wait for build
run: yarn playwright test --project=chromium tests/wait-for-build.spec.ts
working-directory: playwright
- name: Run Playwright tests
# Run separately to allow for parallelism
run: |
yarn playwright test --project=chromium
# Temporarily disable firefox: https://github.com/microsoft/playwright/issues/13853
# yarn playwright test --project=firefox
working-directory: playwright
- name: Upload test artifacts
if: always() # Upload on pass or fail
uses: actions/upload-artifact@v3
with:
name: playwright
path: playwright/test-results
- uses: anchore/scan-action/download-grype@v3
id: grype
- name: Run grype on the image ruby
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-ruby:latest
- name: Run grype on the image node
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-node:latest
- name: Run grype on the image base
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-base:latest
- name: Run grype on the image init
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-init:latest
- name: Run grype on the image redis
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-redis:latest
- name: Run grype on the image minio
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-minio:latest
- name: Run grype on the image operator
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-operator:latest
- name: Run grype on the image cmd-tlm-api
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-cmd-tlm-api:latest
- name: Run grype on the image script-runner-api
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-script-runner-api:latest
- name: Run grype on the image traefik
run: ${{steps.grype.outputs.cmd}} docker.io/ballaerospace/cosmosc2-traefik:latest