Skip to content

Split rainix.yaml into per-task slim-shell workflows #172

Split rainix.yaml into per-task slim-shell workflows

Split rainix.yaml into per-task slim-shell workflows #172

name: Copilot Agent Setup
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
COMMIT_SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- uses: cachix/cachix-action@v15
continue-on-error: true
with:
name: rainlanguage
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
useDaemon: false
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v7
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1G
- uses: Swatinem/rust-cache@v2
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ github.workflow }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-${{ runner.os }}-
- name: Prepare environment files
run: |
set -euxo pipefail
cp -f .env.example .env
cp -f packages/webapp/.env.example packages/webapp/.env
cp -f .env.example crates/common/.env
# Inlined bootstrap (formerly ./prep-all.sh). All committed ABIs +
# vendored IMulticall3.sol mean cargo doesn't need forge build /
# soldeer install — forge is still on PATH in .#sol-shell if copilot
# needs it later.
- run: |
nix develop .#wasm-shell -c bash -c '
set -euxo pipefail
npm install --no-check
(cd packages/ui-components && npm i && npm run lint)
npm run build -w @rainlanguage/raindex
npm run build -w @rainlanguage/ui-components
npm run build -w @rainlanguage/webapp
'
# forwards status to telegram chat if this ci fails or gets canceled, only runs for default branch
- name: Forward CI Status
if: always()
uses: rainlanguage/github-chore/.github/actions/telegram-status-report@main
with:
status: ${{ job.status }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}