CI: Add webclient (#4478)

This commit is contained in:
tooomm
2021-11-26 22:55:53 +01:00
committed by GitHub
parent 6dc9f004ce
commit c5aaa0bc2e
5 changed files with 95 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
name: Build
name: Build Desktop
on:
push:
@@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.md'
- 'webclient/**'
- '.github/workflows/web-*.yml'
tags:
- '*'
pull_request:
@@ -15,6 +16,7 @@ on:
paths-ignore:
- '**.md'
- 'webclient/**'
- '.github/workflows/web-*.yml'
jobs:
configure:

View File

@@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.md'
- 'webclient/**'
- '.github/workflows/web-*.yml'
jobs:
clang-format:

55
.github/workflows/web-build.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Build Web
on:
push:
branches:
- master
paths:
- '.github/workflows/web-*.yml'
- 'webclient/**'
- '!**.md'
pull_request:
branches:
- master
paths:
- '.github/workflows/web-*.yml'
- 'webclient/**'
- '!**.md'
jobs:
build-web:
name: React (Node ${{matrix.node_version}})
runs-on: ubuntu-latest
defaults:
run:
working-directory: webclient
strategy:
fail-fast: false
matrix:
node_version:
- 12
- lts/*
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{matrix.node_version}}
cache: 'npm'
cache-dependency-path: 'webclient/package-lock.json'
- name: Install dependencies
run: npm install
- name: Test app
run: npm run test
- name: Build app
if: always()
run: npm run build

34
.github/workflows/web-lint.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Code Style (TypeScript)
on:
pull_request:
branches:
- master
paths:
- '.github/workflows/web-*.yml'
- 'webclient/**'
- '!**.md'
jobs:
ESLint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webclient
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: 'npm'
cache-dependency-path: 'webclient/package-lock.json'
- name: Install ESLint
run: npm install --ignore-scripts
- name: Run ESLint
run: npm run lint