Skip to content

Commit

Permalink
Revert "ci: update PR ci to only run one "task" with all jobs and not…
Browse files Browse the repository at this point in the history
… two "ta…"

This reverts commit 8353471.
  • Loading branch information
ResuBaka authored Feb 23, 2025
1 parent 8353471 commit efe8fed
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 62 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check branch changes
on:
push:
branches-ignore:
- main

env:
TEST_TAG: my-test:test

jobs:
frontend_lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Check formatting
run: bun run format:check
frontend_build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
66 changes: 4 additions & 62 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on:

env:
TEST_TAG: my-test:test
CARGO_TERM_COLOR: always

jobs:
frontend-lint:
frontend_lint:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -19,7 +18,7 @@ jobs:
run: bun install --frozen-lockfile
- name: Check formatting
run: bun run format:check
frontend-build:
frontend_build:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -31,15 +30,12 @@ jobs:
run: bun install --frozen-lockfile
- name: Build
run: bun run build
frontend-check-docker:
frontend_check-docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
needs:
- frontend-build
- frontend-lint
if: ${{ needs.frontend-build.result == 'success' && needs.frontend-lint.result == 'success' }}
needs: frontend_build
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -53,57 +49,3 @@ jobs:
context: ./frontend
load: true
tags: ${{ env.TEST_TAG }}
backend-lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Lint
run: cargo fmt --check
backend-build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
steps:
- uses: actions/checkout@v4
- name: Rust setup
run: rustup toolchain install stable --profile minimal
- name: Cache Cargo build target
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
rust/api-server/target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --bin bitcraft-hub-api
backend-check-docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust/api-server
needs:
- backend-build
- backend-lint
if: ${{ needs.backend-build.result == 'success' && needs.backend-lint.result == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export to Docker
uses: docker/build-push-action@v5
with:
context: ./rust/api-server
load: true
tags: ${{ env.TEST_TAG }}

0 comments on commit efe8fed

Please sign in to comment.