fix(ci): simplify workflow to avoid external GitHub actions
Some checks are pending
Lint and Build / Lint (push) Waiting to run
Lint and Build / Build (push) Blocked by required conditions
Lint and Build / Docker Build (push) Blocked by required conditions

The previous workflow was getting stuck because it was trying to pull
actions from GitHub (https://github.com/actions/cache@v3) which can
cause connectivity and compatibility issues in Forgejo.

Changes:
- Remove all external GitHub action dependencies except checkout
- Use Forgejo's built-in checkout@v4 action
- Remove caching steps (can be added later with Forgejo-native actions)
- Add explicit dependency installation step
- Use 'cargo build --release' for better optimization

This should make the CI more reliable and faster to start.
This commit is contained in:
goose 2026-03-12 08:21:42 -03:00
parent dae4d680bb
commit 856f86e72d

View file

@ -22,25 +22,11 @@ jobs:
image: rust:latest
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
uses: actions/checkout@v4
- name: Cache cargo registry
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: https://github.com/actions/cache@v3
with:
path: backend/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: |
apt-get update && apt-get install -y pkg-config libssl-dev
- name: Run rustfmt
working-directory: ./backend
@ -60,30 +46,16 @@ jobs:
needs: lint
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
uses: actions/checkout@v4
- name: Cache cargo registry
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: https://github.com/actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: https://github.com/actions/cache@v3
with:
path: backend/target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: |
apt-get update && apt-get install -y pkg-config libssl-dev
- name: Build project
working-directory: ./backend
run: |
cargo build --verbose
cargo build --release --verbose
- name: Run tests
working-directory: ./backend
@ -101,7 +73,7 @@ jobs:
image: docker:dind
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
uses: actions/checkout@v4
- name: Build Docker image
working-directory: ./backend