Skip to content

Fix ci

Fix ci #1454

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
jobs:
check_database:
name: Check database
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all branches
run: |
CURRENT_BRANCH="$(git branch --show-current)"
for branch in $(git branch --all | grep '^\s*remotes' | grep -vE "HEAD|$CURRENT_BRANCH"); do
git branch --track "${branch##*/}" "$branch"
done
git fetch --all
- name: Checkout master branch
run: |
git checkout $(git remote show origin | awk '/HEAD branch/ {print $NF}')
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun ci
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
- name: Restore cached mod archives
uses: actions/cache/restore@v4
with:
path: |
build/cache
key: mod-cache-${{ steps.get-date.outputs.date }}
restore-keys: |
mod-cache-
- name: Test the database
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
donttesttools: true
BRANCH: ${{ github.ref }}
run: bun run test
- name: Save mod archive cache
uses: actions/cache/save@v4
with:
path: |
build/cache
key: mod-cache-${{ steps.get-date.outputs.date }}