[ci] Update CI

This commit is contained in:
Laura Hausmann 2024-04-01 01:38:08 +02:00
parent c79f03f689
commit cd274f22e5
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -3,32 +3,19 @@ on:
branches-ignore: branches-ignore:
- 'dev' - 'dev'
jobs: jobs:
test-frontend: test-build:
runs-on: docker
container:
image: iceshrimp.dev/iceshrimp/ci-env:latest
steps:
- name: Clone repository
run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp
- name: Build the frontend
run: |
cd /iceshrimp/Iceshrimp.Frontend
yarn --immutable
yarn build
test-backend:
runs-on: docker runs-on: docker
container: container:
image: mcr.microsoft.com/dotnet/sdk:8.0-alpine image: mcr.microsoft.com/dotnet/sdk:8.0-alpine
steps: steps:
- name: Clone repository - name: Clone repository
run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp run: git clone https://iceshrimp.dev/iceshrimp/Iceshrimp.NET.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp
- name: Build the backend - name: Build backend & frontend
run: | run: |
cd /iceshrimp/Iceshrimp.Backend cd /iceshrimp/Iceshrimp.Backend
dotnet restore dotnet restore
mkdir -p ./wwwroot/.vite/ && touch ./wwwroot/.vite/manifest.json
dotnet build dotnet build
- name: Test the backend - name: Run tests
run: | run: |
cd /iceshrimp cd /iceshrimp
dotnet test dotnet test