Skip to content

Commit

Permalink
Merge pull request #20 from UWCS/telf-dev/main
Browse files Browse the repository at this point in the history
fix CI/Cargo issues
  • Loading branch information
Joeyh021 authored Sep 1, 2023
2 parents 2b3e121 + 4c20698 commit df662ea
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 95 deletions.
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

0 comments on commit df662ea

Please sign in to comment.