Skip to content
Open
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
51 changes: 42 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,46 @@ permissions:
on:
push:
branches: [main]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'action.yml'
- 'fledge.toml'
- 'site/**'
- 'vscode-extension/**'
- '.github/workflows/ci.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'tests/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'action.yml'
- 'fledge.toml'
- 'site/**'
- 'vscode-extension/**'
- '.github/workflows/ci.yml'
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo build --verbose
Expand All @@ -31,25 +56,28 @@ jobs:

fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check

audit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}

coverage:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install tarpaulin
Expand All @@ -67,8 +95,9 @@ jobs:

site:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: site
Expand All @@ -85,8 +114,9 @@ jobs:

vscode-extension:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
working-directory: vscode-extension
Expand All @@ -100,17 +130,19 @@ jobs:

validate-action:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Validate action.yml
run: python3 -c "import yaml; yaml.safe_load(open('action.yml'))"

spec-check:
runs-on: ubuntu-latest
timeout-minutes: 20
outputs:
body: ${{ steps.spec-check.outputs.body }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build specsync
Expand All @@ -131,10 +163,11 @@ jobs:

corvid-pet:
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name == 'pull_request' && always()
needs: [test, fmt, validate-action, spec-check, audit, coverage, site, vscode-extension]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Determine combined status
id: status
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
build:
name: Build Astro Site
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -58,6 +59,7 @@ jobs:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ permissions:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
matrix:
include:
Expand All @@ -30,7 +31,7 @@ jobs:
target: x86_64-pc-windows-msvc
artifact: specsync-windows-x86_64.exe
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -76,8 +77,9 @@ jobs:
release:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Download all artifacts
uses: actions/download-artifact@v4
Expand Down
Loading