mirror of
https://github.com/block/goose.git
synced 2026-04-29 12:09:38 +00:00
Some checks are pending
Canary / Prepare Version (push) Waiting to run
Canary / build-cli (push) Blocked by required conditions
Canary / Upload Install Script (push) Blocked by required conditions
Canary / bundle-desktop (push) Blocked by required conditions
Canary / bundle-desktop-linux (push) Blocked by required conditions
Canary / bundle-desktop-windows (push) Blocked by required conditions
Canary / Release (push) Blocked by required conditions
CI / changes (push) Waiting to run
CI / Check Rust Code Format (push) Blocked by required conditions
CI / Build and Test Rust Project (push) Blocked by required conditions
CI / Test and Lint Electron Desktop App (push) Blocked by required conditions
CI / bundle-desktop-unsigned (push) Blocked by required conditions
Deploy Documentation / deploy (push) Waiting to run
Documentation Site Preview / deploy (push) Waiting to run
Publish Docker Image / docker (push) Waiting to run
143 lines
4.3 KiB
YAML
143 lines
4.3 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
merge_group:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
docs-only: ${{ steps.filter.outputs.docs-only }}
|
|
code: ${{ steps.filter.outputs.code }}
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
|
|
|
|
- name: Check for file changes
|
|
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # pin@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
docs-only:
|
|
- 'documentation/**'
|
|
code:
|
|
- '!documentation/**'
|
|
|
|
rust-format:
|
|
name: Check Rust Code Format
|
|
runs-on: ubuntu-latest
|
|
needs: changes
|
|
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
|
|
|
|
- name: Run cargo fmt
|
|
run: source ./bin/activate-hermit && cargo fmt --check
|
|
|
|
rust-build-and-test:
|
|
name: Build and Test Rust Project
|
|
runs-on: goose
|
|
needs: changes
|
|
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
|
|
|
|
- name: Activate hermit and set CARGO_HOME
|
|
run: |
|
|
source bin/activate-hermit
|
|
echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV
|
|
echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update -y
|
|
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
|
|
|
|
- name: Cache Cargo artifacts
|
|
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3
|
|
with:
|
|
path: |
|
|
${{ env.CARGO_HOME }}/bin/
|
|
${{ env.CARGO_HOME }}/registry/index/
|
|
${{ env.CARGO_HOME }}/registry/cache/
|
|
${{ env.CARGO_HOME }}/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Build and Test
|
|
run: |
|
|
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
|
|
source ../bin/activate-hermit
|
|
export CARGO_INCREMENTAL=0
|
|
cargo test --jobs 2
|
|
working-directory: crates
|
|
|
|
- name: Lint
|
|
run: |
|
|
source ./bin/activate-hermit
|
|
export CARGO_INCREMENTAL=0
|
|
./scripts/clippy-lint.sh
|
|
|
|
- name: Install Node.js Dependencies for OpenAPI Check
|
|
run: source ../../bin/activate-hermit && npm ci
|
|
working-directory: ui/desktop
|
|
|
|
- name: Check OpenAPI Schema is Up-to-Date
|
|
run: |
|
|
source ./bin/activate-hermit
|
|
just check-openapi-schema
|
|
|
|
desktop-lint:
|
|
name: Test and Lint Electron Desktop App
|
|
runs-on: macos-latest
|
|
needs: changes
|
|
if: needs.changes.outputs.code == 'true' || github.event_name != 'pull_request'
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4
|
|
|
|
- name: Cache npm dependencies
|
|
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3
|
|
with:
|
|
path: |
|
|
ui/desktop/node_modules
|
|
.hermit/node/cache
|
|
key: ci-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
|
|
restore-keys: |
|
|
ci-npm-cache-v1-${{ runner.os }}-
|
|
|
|
- name: Install Dependencies
|
|
run: source ../../bin/activate-hermit && npm ci
|
|
working-directory: ui/desktop
|
|
|
|
- name: Run Lint
|
|
run: source ../../bin/activate-hermit && npm run lint:check
|
|
working-directory: ui/desktop
|
|
|
|
- name: Run Tests
|
|
run: source ../../bin/activate-hermit && npm run test:run
|
|
working-directory: ui/desktop
|
|
|
|
# Faster Desktop App build for PRs only
|
|
bundle-desktop-unsigned:
|
|
uses: ./.github/workflows/bundle-desktop.yml
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
needs: changes
|
|
if: (github.event_name == 'pull_request' || github.event_name == 'merge_group') && (needs.changes.outputs.code == 'true' || github.event_name != 'pull_request')
|
|
with:
|
|
signing: false
|