Skip to content

Commit

Permalink
Add a devcontainer MSRV check to CI
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Gould <ver@buoyant.io>
  • Loading branch information
olix0r committed Jan 25, 2022
1 parent ba730a3 commit ed44e4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/rust:1.56-bullseye
FROM docker.io/rust:1.56.0-bullseye

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ jobs:
command: check
args: --all

- name: Check devcontainer matches MSRV
run: |
versions="$(sed -nE 's|^FROM (.*/)?rust:([^ ]+)|\2|p' .devcontainer/Dockerfile)"
mismatches="$(echo "$versions" | grep -v "^${{ steps.msrv.outputs.msrv }}")"
if [ -n "$mismatches" ]; then
echo "::error title=\"MSRV mismatch\"::Devcontainer includes incorrect rust version(s): $mismatches"
exit 1
fi
e2e:
# e2e tests are docker on linux
runs-on: ubuntu-latest
Expand Down

0 comments on commit ed44e4e

Please sign in to comment.