Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-plugin: updates for ci workflow #242

Merged
merged 2 commits into from
May 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ jobs:
- name: Build frontend
run: {{ packageManagerName }} run build

- name: Start grafana docker
run: docker-compose up -d

- name: Run e2e tests
run: {{ packageManagerName }} run e2e

- name: Stop grafana docker
run: docker-compose down

- name: Check for backend
id: check-for-backend
run: |
Expand All @@ -60,7 +51,7 @@ jobs:
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: '1.20'

- name: Test backend
if: steps.check-for-backend.outputs.has-backend == 'true'
Expand All @@ -75,3 +66,31 @@ jobs:
with:
version: latest
args: buildAll

- name: Check for E2E
id: check-for-e2e
run: |
if [ -d "cypress" ]
then
echo "has-e2e=true" >> $GITHUB_OUTPUT
fi

- name: Start grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose up -d

- name: Run e2e tests
if: steps.check-for-e2e.outputs.has-e2e == 'true'
Copy link
Collaborator

@jackw jackw May 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add id: run-e2e-tests to this step if we want to only upload videos for failing tests.

run: {{ packageManagerName }} run e2e

- name: Stop grafana docker
if: steps.check-for-e2e.outputs.has-e2e == 'true'
run: docker-compose down

- name: Archive E2E output
uses: actions/upload-artifact@v3
if: steps.check-for-e2e.outputs.has-e2e == 'true'
with:
name: cypress-videos
path: cypress/videos
retention-days: 5