Fix
This commit is contained in:
parent
1790da9ba9
commit
07d181fa55
1 changed files with 19 additions and 12 deletions
|
|
@ -8,6 +8,8 @@ on:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
RUSTFLAGS: '-Dwarnings'
|
||||||
REGISTRY: ${{ forgejo.server_url }}
|
REGISTRY: ${{ forgejo.server_url }}
|
||||||
IMAGE_NAME: ${{ forgejo.repository }}
|
IMAGE_NAME: ${{ forgejo.repository }}
|
||||||
|
|
||||||
|
|
@ -15,20 +17,26 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install components
|
- name: Cache Rust dependencies
|
||||||
run: rustup component add rustfmt clippy
|
uses: actions/cache@v4
|
||||||
|
|
||||||
- name: Cache cargo registry
|
|
||||||
uses: https://code.forgejo.org/actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/bin/
|
||||||
~/.cargo/git
|
~/.cargo/registry/index/
|
||||||
target
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-cargo-
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
||||||
|
| sh -s -- -y --default-toolchain stable --profile default
|
||||||
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
|
|
@ -43,8 +51,7 @@ jobs:
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build and publish image
|
- name: Build and publish image
|
||||||
uses: http://forgejo:3000/andras/ci-actions/docker-publish@main
|
uses: http://forgejo:3000/andras/ci-actions/docker-publish@main
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue