Skip to content

CI (daily)

CI (daily) #184

Workflow file for this run

name: CI (daily)
on:
schedule:
# Run at 7 AM AEST, some tests check if packages are up to date (e.g. `expo
# doctor`). Without a schedule then random pull requests can fail.
- cron: 0 17 * * *
workflow_dispatch:
jobs:
moon-ci:
runs-on: ubuntu-latest
steps:
- name: 🏗 Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-tools
# HACK: There's a quirk/bug in moon where if you're on the default branch,
# `moon ci --base` is ignored and instead the previous commit is used as
# the base. See
# https://github.com/moonrepo/moon/blob/7d2f6a18fc7a1451884e6222a716605b7705a15b/crates/app/src/queries/touched_files.rs#L60
# and discord conversation
# https://discord.com/channels/974160221452763146/974160221452763149/1259352611799175278
# for more information.
- run: git checkout $(git rev-list -1 HEAD)
- run: moon ci --color --base $HHH_EMPTY_GIT_TREE
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
EXPO_PUBLIC_REPLICACHE_LICENSE_KEY: TEST_LICENSE_KEY
# Magic "empty" tree https://jiby.tech/post/git-diff-empty-repo/, so
# that all files are seen as "affected" by moon ci, and thus all CI
# tests are run.
HHH_EMPTY_GIT_TREE: 4b825dc642cb6eb9a060e54bf8d69288fbee4904