Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,12 @@ jobs:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dtolnay/rust-toolchain@0c3131df9e5407c0c36352032d04af846dbe0fb7 # nightly
with:
components: rustfmt
- uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
cache-on-failure: true
add-rust-environment-hash-key: "false"
key: nightly-${{ hashFiles('Cargo.lock') }}
key: stable-${{ hashFiles('Cargo.lock') }}
- name: Install just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
- run: just check-format
- run: just check-deny
109 changes: 109 additions & 0 deletions .github/workflows/ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: UI
permissions:
contents: read

on:
push:
branches: [ master ]
paths: ['ui/**']
pull_request:
paths: ['ui/**']

jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.filter.outputs.projects }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: paths
with:
filters: |
tips:
- 'ui/tips/**'
- id: filter
run: |
projects='[]'
if [ "${{ steps.paths.outputs.tips }}" == "true" ]; then
projects=$(echo "$projects" | jq -c '. + ["tips"]')
fi
echo "projects=$projects" >> $GITHUB_OUTPUT

lint:
name: Lint (${{ matrix.project }})
needs: changes
if: ${{ needs.changes.outputs.projects != '[]' }}
runs-on: ubuntu-latest
strategy:
matrix:
project: ${{ fromJson(needs.changes.outputs.projects) }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
- run: cp .env.example ui/${{ matrix.project }}/.env
- run: cd ui/${{ matrix.project }} && yarn install
- run: cd ui/${{ matrix.project }} && yarn lint

type-check:
name: Type Check (${{ matrix.project }})
needs: changes
if: ${{ needs.changes.outputs.projects != '[]' }}
runs-on: ubuntu-latest
strategy:
matrix:
project: ${{ fromJson(needs.changes.outputs.projects) }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
- run: cp .env.example ui/${{ matrix.project }}/.env
- run: cd ui/${{ matrix.project }} && yarn install
- run: cd ui/${{ matrix.project }} && npx tsc --noEmit

build:
name: Build (${{ matrix.project }})
needs: changes
if: ${{ needs.changes.outputs.projects != '[]' }}
runs-on: ubuntu-latest
strategy:
matrix:
project: ${{ fromJson(needs.changes.outputs.projects) }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: ui/${{ matrix.project }}/yarn.lock
- run: cp .env.example ui/${{ matrix.project }}/.env
- run: cd ui/${{ matrix.project }} && yarn install
- run: cd ui/${{ matrix.project }} && yarn build
Loading
Loading