chore(ci): update CI to run more less often and more efficient

This commit is contained in:
Gabe Kangas
2025-10-06 20:18:07 -07:00
parent 9b15da74d9
commit 7800afd95a
12 changed files with 165 additions and 4 deletions
+26
View File
@@ -1,3 +1,10 @@
# This workflow runs browser-based tests using Cypress
# Triggers:
# - Push/PR with web or browser test changes
# Skips:
# - Documentation-only changes in web/
# - Configuration-only changes
name: Browser Tests
on:
@@ -30,11 +37,27 @@ jobs:
uses: actions/checkout@v5
if: github.event_name == 'push'
- name: Get changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v46
with:
files_yaml: |
testable:
- 'web/**/*.{tsx,ts,jsx,js,css,scss}'
- 'test/automated/browser/**'
- '**/*.go'
- 'go.mod'
- 'go.sum'
docs:
- '**/*.md'
- uses: actions/setup-node@v4
if: steps.changed-files-yaml.outputs.testable_any_changed == 'true'
with:
node-version: '22.18.0'
- name: Cache node modules
if: steps.changed-files-yaml.outputs.testable_any_changed == 'true'
uses: actions/cache@v4
env:
cache-name: cache-node-modules-browser-tests
@@ -47,14 +70,17 @@ jobs:
${{ runner.os }}-
- uses: actions/setup-go@v5
if: steps.changed-files-yaml.outputs.testable_any_changed == 'true'
with:
go-version: '1.24'
cache: true
- name: Install Google Chrome
if: steps.changed-files-yaml.outputs.testable_any_changed == 'true'
run: sudo apt-get update && sudo apt-get install google-chrome-stable
- name: Run Browser tests
if: steps.changed-files-yaml.outputs.testable_any_changed == 'true'
uses: nick-fields/retry@v3
with:
timeout_minutes: 20