Update GitHub CI

Due to us moving to Radicle, we need to implement the following changes.

- We don't need the CI to run on pull_requests anymore.
- We want the CI to run on any push.
- For visual tests we don't want to update any comments and just fail
  the test and upload the artifacts for checking.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-10-02 11:23:09 +02:00
parent bea8af8497
commit aa2ce409fb
6 changed files with 7 additions and 79 deletions
+1 -7
View File
@@ -1,11 +1,5 @@
name: check-build
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
check-build:
+1 -7
View File
@@ -1,11 +1,5 @@
name: check-e2e
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
check-e2e:
@@ -1,11 +1,5 @@
name: check-httpd-api-unit-test
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
check-httpd-api-unit-test:
+1 -7
View File
@@ -1,11 +1,5 @@
name: check-unit-test
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
check-unit-test:
+2 -44
View File
@@ -1,11 +1,5 @@
name: check-visual
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
generate-visual-diffs:
@@ -65,7 +59,7 @@ jobs:
if [ ${{ github.ref }} = "refs/heads/master" ]; then
npm run test:e2e -- --project visual --update-snapshots || true;
else
npm run test:e2e -- --project visual || true;
npm run test:e2e -- --project visual;
fi
# We don't care about logs in visual snapshot tests, only the images.
@@ -94,39 +88,3 @@ jobs:
else
echo "present=false" >> $GITHUB_OUTPUT
fi
- name: Find Comment
if: github.ref != 'refs/heads/master'
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: "**Visual diff results for latest changes**"
- name: Create or update comment
if: github.ref != 'refs/heads/master' && steps.check_artifacts.outputs.present == 'false'
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
**Visual diff results for latest changes**
✅ There are no visual differences between `master` and this branch.
edit-mode: replace
- name: Create or update comment
if: github.ref != 'refs/heads/master' && steps.check_artifacts.outputs.present == 'true'
uses: peter-evans/create-or-update-comment@v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
**Visual diff results for latest changes**
⚠️ There are visual differences between `master` and this branch.
👉 [Latest diff snapshots](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
- [ ] The visual changes were intentional.
edit-mode: replace
+1 -7
View File
@@ -1,11 +1,5 @@
name: check
on:
push:
branches:
- master
pull_request:
branches:
- master
on: push
jobs:
check: