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