63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Fusion CLI
|
|
run: dotnet tool install -g HotChocolate.Fusion.CommandLine
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore FictionArchive.sln
|
|
|
|
- name: Build solution
|
|
run: dotnet build FictionArchive.sln --configuration Release --no-restore
|
|
|
|
- name: Run tests
|
|
run: dotnet test FictionArchive.sln --configuration Release --no-build --verbosity normal
|
|
|
|
build-frontend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: fictionarchive-web
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6.0.0
|
|
with:
|
|
node-version: '20'
|
|
package-manager-cache: false
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Build
|
|
run: npm run build
|