Skip to content

feat: add create subtask buttons #169

feat: add create subtask buttons

feat: add create subtask buttons #169

Workflow file for this run

name: 'Checks'
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- master
- develop
permissions:
contents: read
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: Frontend
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Setup Nix and Cachix
uses: ./.github/actions/setup-nix-cachix
with:
cache-name: ${{ vars.CACHIX_CACHE_NAME || 'chiri' }}
auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
skip-push: ${{ secrets.CACHIX_AUTH_TOKEN == '' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
- name: Install dependencies
run: nix develop -c pnpm install --frozen-lockfile
- name: Lint and format check
run: nix develop -c pnpm exec biome check .
- name: Run tests
run: nix develop -c pnpm test
nix:
name: Nix
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Nix and Cachix
uses: ./.github/actions/setup-nix-cachix
with:
cache-name: ${{ vars.CACHIX_CACHE_NAME || 'chiri' }}
auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
skip-push: ${{ secrets.CACHIX_AUTH_TOKEN == '' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
- name: Evaluate flake outputs
run: nix flake show --all-systems
- name: Check source package inputs
id: source-package-inputs
shell: bash
run: |
set -euo pipefail
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "Manual run; building source package"
exit 0
fi
case "$GITHUB_EVENT_NAME" in
pull_request)
base="${{ github.event.pull_request.base.sha }}"
head="$GITHUB_SHA"
;;
push)
base="${{ github.event.before }}"
head="$GITHUB_SHA"
;;
*)
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "Unknown event '$GITHUB_EVENT_NAME'; building source package"
exit 0
;;
esac
if [[ -z "$base" || "$base" =~ ^0+$ ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "No usable base commit; building source package"
exit 0
fi
if ! git cat-file -e "$base^{commit}" || ! git cat-file -e "$head^{commit}"; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "Could not resolve diff commits; building source package"
exit 0
fi
changed_files="$(git diff --name-only "$base" "$head")"
printf '%s\n' "$changed_files"
if printf '%s\n' "$changed_files" | grep -Eq '^(flake\.lock|flake\.nix|nix/|index\.html|package\.json|pnpm-lock\.yaml|pnpm-workspace\.yaml|public/|src/|src-tauri/|tsconfig[^/]*\.json|vite\.config\.ts)'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "Source package inputs changed; building source package"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "No source package inputs changed; skipping source package build"
fi
- name: Build source package
id: source-build
if: steps.source-package-inputs.outputs.changed == 'true'
continue-on-error: true
run: nix build .#source --print-build-logs
- name: Generate Nix hash update patch
if: steps.source-build.outcome == 'failure' && github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'dependabot/')
shell: bash
run: |
set -euo pipefail
./scripts/update-hashes.sh
git diff -- nix/packages/source.nix > nix-hash-update.patch
if [[ ! -s nix-hash-update.patch ]]; then
echo "No Nix hash patch was generated."
exit 1
fi
{
echo "## Nix hash update"
echo
echo "The source package build failed because Dependabot changed dependency lockfiles without updating Nix fixed-output hashes."
echo
echo "A follow-up workflow will validate the generated patch and commit the refreshed hashes back to the Dependabot branch."
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload Nix hash update patch
if: steps.source-build.outcome == 'failure' && github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'dependabot/')
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: nix-hash-update
path: nix-hash-update.patch
if-no-files-found: error
- name: Report source package build failure
if: steps.source-build.outcome == 'failure'
run: exit 1
- name: Skip source package build
if: steps.source-package-inputs.outputs.changed != 'true'
run: echo "No source package inputs changed"
rust:
name: Rust
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Setup Nix and Cachix
uses: ./.github/actions/setup-nix-cachix
with:
cache-name: ${{ vars.CACHIX_CACHE_NAME || 'chiri' }}
auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
skip-push: ${{ secrets.CACHIX_AUTH_TOKEN == '' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
- name: Check Rust formatting
run: nix develop -c cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
- name: Run Rust tests
run: nix develop -c cargo test --manifest-path src-tauri/Cargo.toml --all-targets
- name: Run Clippy
run: nix develop -c cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings