2023-08-28 13:54:26 +09:00
|
|
|
on:
|
2024-07-08 11:01:16 +09:00
|
|
|
push:
|
2023-08-28 13:54:26 +09:00
|
|
|
jobs:
|
|
|
|
test-build:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
2023-08-31 01:14:48 +09:00
|
|
|
image: iceshrimp.dev/iceshrimp/ci-env:latest
|
2023-11-04 23:09:46 +09:00
|
|
|
options: --volume /opt/iceshrimp-cache/yarn:/iceshrimp-caches/yarn
|
2023-08-28 13:54:26 +09:00
|
|
|
services:
|
|
|
|
database:
|
|
|
|
image: postgres:15
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: "test"
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
2024-07-08 11:01:16 +09:00
|
|
|
run: git clone https://iceshrimp.dev/iceshrimp/iceshrimp.git --branch=${{ github.ref_name }} --depth=1 .
|
2023-08-28 13:54:26 +09:00
|
|
|
- name: Install build dependencies
|
|
|
|
run: |
|
|
|
|
cp -Tr /iceshrimp-caches/yarn .yarn
|
2023-11-18 10:35:10 +09:00
|
|
|
yarn --immutable
|
2023-08-28 13:54:26 +09:00
|
|
|
rm -rf /iceshrimp-caches/yarn/* && cp -Tr .yarn /iceshrimp-caches/yarn
|
|
|
|
- name: Build the shrimp
|
2024-07-08 11:01:16 +09:00
|
|
|
run: yarn build:debug
|
2023-08-28 13:54:26 +09:00
|
|
|
- name: Test the shrimp
|
|
|
|
run: |
|
|
|
|
cp .config/ci.yml .config/default.yml
|
|
|
|
yarn run migrate
|