add workflow
This commit is contained in:
parent
535a59f092
commit
912bf9d0bd
4 changed files with 160 additions and 0 deletions
45
.forgejo/workflows/web.yml
Normal file
45
.forgejo/workflows/web.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: Web CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/web.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'web/**'
|
||||
- 'docker-compose.yml'
|
||||
- '.forgejo/workflows/web.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
name: Build and test web app
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
working-directory: web
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install --no-fund --no-audit
|
||||
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
- name: Build app
|
||||
run: npm run build
|
||||
Loading…
Add table
Add a link
Reference in a new issue