added 260907 version of worker toolkit
This commit is contained in:
75
worker-toolkit-flaredown/repo/.github/workflows/frontend.yml
vendored
Normal file
75
worker-toolkit-flaredown/repo/.github/workflows/frontend.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
name: frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
backend: ${{ steps.filter.outputs.backend }}
|
||||
frontend: ${{ steps.filter.outputs.frontend }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
backend:
|
||||
- 'backend/**'
|
||||
- '.github/workflows/**'
|
||||
frontend:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
test-app:
|
||||
name: Test app
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14
|
||||
cache: npm
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
- uses: browser-actions/setup-chrome@v2
|
||||
id: setup-chrome
|
||||
- run: npm install -g npm@6.14.18
|
||||
- run: npm install
|
||||
working-directory: ./frontend
|
||||
- run: npm run test
|
||||
working-directory: ./frontend
|
||||
env:
|
||||
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
|
||||
|
||||
node-next-test:
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['16', '18', '20']
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.frontend == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
- uses: browser-actions/setup-chrome@v2
|
||||
id: setup-chrome
|
||||
- run: npm install
|
||||
working-directory: ./frontend
|
||||
- run: npm run test
|
||||
working-directory: ./frontend
|
||||
env:
|
||||
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
|
||||
Reference in New Issue
Block a user