trashposs/.forgejo/workflows/test-build.yaml

34 lines
972 B
YAML
Raw Normal View History

2023-08-28 06:54:26 +02:00
on:
- push
jobs:
test-build:
runs-on: docker
container:
2024-04-06 23:55:59 +02:00
image: iceshrimp.dev/trashposs/ci-env:latest
options: --volume /opt/trashposs-cache/yarn:/trashposs-caches/yarn
2023-08-28 06:54:26 +02:00
services:
database:
image: postgres:15
env:
POSTGRES_PASSWORD: "test"
redis:
image: redis
steps:
- name: Clone repository
2024-04-06 23:55:59 +02:00
run: git clone https://iceshrimp.dev/Crimekillz/trashposs.git --branch=${{ github.ref_name }} --depth=1 /trashposs
2023-08-28 06:54:26 +02:00
- name: Install build dependencies
run: |
2024-04-06 23:55:59 +02:00
cd /trashposs
cp -Tr /trashposs-caches/yarn .yarn
yarn --immutable
2024-04-06 23:55:59 +02:00
rm -rf /trashposs-caches/yarn/* && cp -Tr .yarn /trashposs-caches/yarn
2023-08-28 06:54:26 +02:00
- name: Build the shrimp
run: |
2024-04-06 23:55:59 +02:00
cd /trashposs
yarn build:debug
2023-08-28 06:54:26 +02:00
- name: Test the shrimp
run: |
2024-04-06 23:55:59 +02:00
cd /trashposs
2023-08-28 06:54:26 +02:00
cp .config/ci.yml .config/default.yml
yarn run migrate