Skip to content

Commit

Permalink
Use docker's native github actions caching
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Oct 25, 2024
1 parent bac5bcf commit e620a3e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
push:
branches:
- main
#- main
pull_request:
merge_group:
branches:
Expand All @@ -22,13 +22,6 @@ jobs:
- name: set up docker buildx
run: docker buildx create --name builder --use

- name: cache docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: docker-buildx-rs-${{ github.sha }}
restore-keys: docker-buildx-rs-

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
Expand All @@ -39,6 +32,18 @@ jobs:
- name: Register rust problem matcher
run: echo "::add-matcher::.github/problem-matchers/rust.json"

- name: Build and cache
uses: docker/build-push-action@v6
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
with:
tags: sudo-test-rs
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
file: test-framework/sudo-test/src/ours.Dockerfile

- name: Run all E2E tests
working-directory: test-framework
run: cargo test -p e2e-tests
Expand Down

0 comments on commit e620a3e

Please sign in to comment.