Skip to content

Commit

Permalink
Merge branch 'wait-for-background-workers' of https://github.com/jaco…
Browse files Browse the repository at this point in the history
…vdbergh/loco into wait-for-background-workers
  • Loading branch information
jacovdbergh committed Oct 31, 2024
2 parents 4539b93 + d085747 commit 7ad937d
Show file tree
Hide file tree
Showing 126 changed files with 557 additions and 2,707 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/ci-example.yml → .github/workflows/demo-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: examples/demo
name: "[demo:ci]"

on:
push:
Expand All @@ -11,8 +11,7 @@ env:
TOOLCHAIN_PROFILE: minimal

jobs:
rustfmt:
name: Check Style
style:
runs-on: ubuntu-latest

permissions:
Expand All @@ -25,31 +24,16 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- run: cargo fmt --all -- --check
working-directory: ./examples/demo

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
working-directory: ./examples/demo
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
working-directory: ./examples/demo

test:
name: Run Tests
needs: [rustfmt, clippy]
needs: [style]
runs-on: ubuntu-latest

permissions:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docs
name: "[docs]"

on:
push:
Expand All @@ -12,7 +12,6 @@ env:

jobs:
check:
name: Check
runs-on: ubuntu-latest

permissions:
Expand All @@ -25,8 +24,6 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- run: cargo install snipdoc --features exec
- run: snipdoc check
- run: snipdoc check
env:
SNIPDOC_SKIP_EXEC_COMMANDS: true


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: e2e-cli-master
name: "[loco-cli:e2e(master)]"

on:
push:
Expand All @@ -8,8 +8,7 @@ on:

jobs:
# TODO: re-enable after 0.8 to check cmd spawning fix
saas-template-win32:
name: Create saas (win32)
saas-win32:
runs-on: windows-latest

permissions:
Expand Down Expand Up @@ -47,8 +46,7 @@ jobs:
cargo loco db migrate
working-directory: ./saas
saas-template:
name: Create saas
saas:
runs-on: ubuntu-latest

permissions:
Expand All @@ -68,7 +66,6 @@ jobs:
working-directory: ./saas
rest-api:
name: Create rest-api
runs-on: ubuntu-latest

permissions:
Expand All @@ -88,7 +85,6 @@ jobs:
working-directory: ./restapi
lightweight-service:
name: Create lightweight-service
runs-on: ubuntu-latest

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: e2e
name: "[loco-cli:e2e]"

on:
schedule:
- cron: 0 * * * * # every hour

jobs:
saas-template:
name: Create saas starter template
saas:
runs-on: ubuntu-latest

permissions:
Expand All @@ -26,7 +25,6 @@ jobs:
working-directory: ./saas
rest-api:
name: Create stateless starter template
runs-on: ubuntu-latest

permissions:
Expand All @@ -46,7 +44,6 @@ jobs:
working-directory: ./restapi
lightweight-service:
name: Create stateless starter template
runs-on: ubuntu-latest

permissions:
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/loco-cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: loco-cli
name: "[loco-cli:ci]"

on:
push:
Expand All @@ -11,8 +11,7 @@ env:
TOOLCHAIN_PROFILE: minimal

jobs:
rustfmt:
name: Check Style
style:
runs-on: ubuntu-latest

permissions:
Expand All @@ -25,31 +24,16 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- run: cargo fmt --all -- --check
working-directory: ./loco-cli

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
working-directory: ./loco-cli
- name: Run cargo clippy
run: cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms
working-directory: ./loco-cli

test:
name: Run Tests
needs: [rustfmt, clippy]
needs: [style]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/loco-gen
name: "[loco-gen:ci]"

on:
push:
Expand All @@ -15,8 +15,7 @@ defaults:
working-directory: ./loco-gen

jobs:
rustfmt:
name: Check Style
style:
runs-on: ubuntu-latest

permissions:
Expand All @@ -29,36 +28,21 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms

test:
name: Run Tests
needs: [rustfmt, clippy]
needs: [style]
runs-on: ubuntu-latest

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-generators
name: "[loco-gen:e2e]"

on:
push:
Expand All @@ -12,7 +12,7 @@ env:

jobs:
test:
name: Run Tests
name: test-generate
runs-on: ubuntu-latest

permissions:
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres_test

model_fields_generator:
name: Run Tests
name: test-fields
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/ci.yml → .github/workflows/loco-rs-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: "[loco_rs:ci]"

on:
push:
Expand All @@ -11,8 +11,7 @@ env:
TOOLCHAIN_PROFILE: minimal

jobs:
rustfmt:
name: Check Style
style:
runs-on: ubuntu-latest

permissions:
Expand All @@ -25,36 +24,21 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery -W rust-2018-idioms

test:
name: Run Tests
needs: [rustfmt, clippy]
needs: [style]
runs-on: ubuntu-latest

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: starters/lightweight-service
name: "[starters/lightweight:ci]"

on:
push:
Expand All @@ -15,8 +15,7 @@ env:
TOOLCHAIN_PROFILE: minimal

jobs:
rustfmt:
name: Check Style
style:
runs-on: ubuntu-latest

permissions:
Expand All @@ -29,31 +28,16 @@ jobs:
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt
- run: cargo fmt --all -- --check
working-directory: ./starters/lightweight-service

clippy:
name: Run Clippy
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout the code
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
working-directory: ./starters/lightweight-service
- name: Run cargo clippy
run: cargo clippy -- -W clippy::nursery -W clippy::pedantic -W rust-2018-idioms -W rust-2021-compatibility
working-directory: ./starters/lightweight-service

test:
name: Run Tests
needs: [rustfmt, clippy]
needs: [style]
runs-on: ubuntu-latest

permissions:
Expand Down
Loading

0 comments on commit 7ad937d

Please sign in to comment.