mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-30 15:58:05 +09:00
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
on:
|
|
- push
|
|
jobs:
|
|
test-build:
|
|
runs-on: docker
|
|
container:
|
|
image: iceshrimp.dev/iceshrimp/ci-env:latest
|
|
options: --volume /opt/iceshrimp-cache/yarn:/iceshrimp-caches/yarn --volume /opt/iceshrimp-cache/cargo:/root/.cargo --volume /opt/iceshrimp-cache/built:/iceshrimp-caches/built --volume /opt/iceshrimp-cache/target:/iceshrimp-caches/target
|
|
services:
|
|
database:
|
|
image: postgres:15
|
|
env:
|
|
POSTGRES_PASSWORD: "test"
|
|
redis:
|
|
image: redis
|
|
steps:
|
|
- name: Clone repository
|
|
run: git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git --branch=${{ github.ref_name }} --depth=1 /iceshrimp
|
|
- name: Install build dependencies
|
|
run: |
|
|
cd /iceshrimp
|
|
cp -Tr /iceshrimp-caches/yarn .yarn
|
|
yarn
|
|
rm -rf /iceshrimp-caches/yarn/* && cp -Tr .yarn /iceshrimp-caches/yarn
|
|
- name: Build the shrimp
|
|
run: |
|
|
cd /iceshrimp
|
|
yarn build:debug
|
|
- name: Test the shrimp
|
|
run: |
|
|
cd /iceshrimp
|
|
cp .config/ci.yml .config/default.yml
|
|
yarn run migrate
|