Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI/Cargo issues #20

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ jobs:
name: Build
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2
with:
with:
shared-key: ci-build

- name: Check that lockfile is up to date
run: cargo update #--locked

- name: Check code builds without warnings
run: cargo check --verbose --workspace
run: cargo clippy --locked --verbose --workspace

lint:
runs-on: ubuntu-latest
Expand All @@ -33,7 +31,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
with:
shared-key: ci-build
save-if: false
- name: Run clippy
Expand All @@ -49,20 +47,19 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
with:
shared-key: ci-build
save-if: false
- name: Run Cargo tests
run: cargo test --verbose



docker_publish:
runs-on: ubuntu-latest
name: Publish built container
needs:
- lint
- test

if: success() && github.ref_name == 'main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v3
Expand All @@ -72,7 +69,7 @@ jobs:
filters: |
server:
- 'dcspkg_server/**'

- name: Build and publish a Docker image for dcspkg server
if: steps.has_server_changed.outputs.server == 'true'
uses: macbre/push-to-ghcr@v12
Expand All @@ -90,7 +87,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
with:
shared-key: ci-build
save-if: false
- uses: katyo/publish-crates@v1
Expand Down
Loading