mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Refactor GH actions
This commit is contained in:
parent
f7507fbeab
commit
60102f28b6
4 changed files with 76 additions and 18 deletions
|
@ -1,14 +1,19 @@
|
||||||
name: TypeScript Build Check
|
name: Build
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master, release* ]
|
branches: [ master, release* ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, release* ]
|
branches: [ master, release* ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tsc:
|
run-build-prod:
|
||||||
name: Run TypeScript build check
|
name: Run production build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -25,8 +30,12 @@ jobs:
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: npm ci --no-audit
|
run: npm ci --no-audit
|
||||||
|
|
||||||
- name: Run tsc
|
- name: Run a production build
|
||||||
run: npm run build:check
|
run: npm run build:production
|
||||||
|
|
||||||
- name: Run test suite
|
- name: Upload artifact
|
||||||
run: npm run test
|
uses: actions/upload-artifact@v3.1.3
|
||||||
|
with:
|
||||||
|
name: jellyfin-web__prod
|
||||||
|
path: |
|
||||||
|
dist
|
|
@ -1,31 +1,34 @@
|
||||||
name: "CodeQL"
|
name: CodeQL
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master, release* ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master, release* ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 7 * * 6'
|
- cron: '30 7 * * 6'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
codeql:
|
||||||
name: Analyze
|
name: CodeQL
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
language: [ 'javascript' ]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
uses: github/codeql-action/init@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: javascript
|
||||||
queries: +security-extended
|
queries: +security-extended
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
uses: github/codeql-action/autobuild@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
uses: github/codeql-action/analyze@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
|
@ -1,4 +1,8 @@
|
||||||
name: Lint
|
name: Quality checks
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -99,3 +103,45 @@ jobs:
|
||||||
|
|
||||||
- name: Run stylelint
|
- name: Run stylelint
|
||||||
run: npm run stylelint:scss
|
run: npm run stylelint:scss
|
||||||
|
|
||||||
|
run-tsc:
|
||||||
|
name: Run TypeScript build check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
|
- name: Setup node environment
|
||||||
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
check-latest: true
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: npm ci --no-audit
|
||||||
|
|
||||||
|
- name: Run tsc
|
||||||
|
run: npm run build:check
|
||||||
|
|
||||||
|
run-test:
|
||||||
|
name: Run tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||||
|
|
||||||
|
- name: Setup node environment
|
||||||
|
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
check-latest: true
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Install Node.js dependencies
|
||||||
|
run: npm ci --no-audit
|
||||||
|
|
||||||
|
- name: Run test suite
|
||||||
|
run: npm run test
|
Loading…
Add table
Add a link
Reference in a new issue