diff --git a/.forgejo/workflows/lint-and-build.yml b/.forgejo/workflows/lint-and-build.yml index cdb12a5..d3ed5da 100644 --- a/.forgejo/workflows/lint-and-build.yml +++ b/.forgejo/workflows/lint-and-build.yml @@ -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