1111 runs-on : ubuntu-latest
1212 if : " !contains(github.event.head_commit.message, '[skip ci]')"
1313 steps :
14- - uses : actions/checkout@master
15- - uses : actions-rs/toolchain@v1
16- with :
17- toolchain : stable
18- components : clippy, rustfmt
19- override : true
20- - name : Run clippy
21- uses : actions-rs/clippy-check@v1
22- with :
23- token : ${{ secrets.GITHUB_TOKEN }}
24- args : --all-features -- -Dwarnings
14+ - uses : actions/checkout@v4
2515 - uses : actions/setup-java@v4
2616 with :
2717 distribution : temurin
@@ -32,35 +22,41 @@ jobs:
3222 run : firebase emulators:start --only firestore --project test-project &
3323 - name : Wait for Firestore emulator
3424 run : timeout 60 bash -c 'until curl -sf http://localhost:8080; do sleep 2; done'
25+ - name : Build test image
26+ run : ./build.sh --build-only --builder retrograde-test-builder
27+ - name : Run clippy
28+ run : podman run --rm retrograde-test-builder cargo clippy --all-features -- -Dwarnings
3529 - name : Run tests
36- env :
37- FIRESTORE_EMULATOR_HOST : localhost:8080
38- run : cargo test -- --include-ignored
30+ run : podman run --rm --network host -e FIRESTORE_EMULATOR_HOST=localhost:8080 retrograde-test-builder cargo test -- --include-ignored
3931
4032 cd :
4133 runs-on : ubuntu-latest
4234 needs : ci
4335 if : " !contains(github.event.head_commit.message, '[skip ci]') && github.ref == 'refs/heads/master'"
36+ env :
37+ IMAGE : us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT }}/retrograde/retrograde:latest
4438 steps :
45- - uses : actions/checkout@v1
39+ - uses : actions/checkout@v4
4640 - id : auth
4741 uses : google-github-actions/auth@v1
4842 with :
4943 credentials_json : " ${{ secrets.GCP_ACCOUNT_CREDENTIALS }}"
5044 - uses : google-github-actions/setup-gcloud@v1
51- - name : Docker build
52- run : docker build . -t us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT }}/retrograde/retrograde:latest
53- - name : Docker push
54- run : gcloud auth configure-docker us-east1-docker.pkg.dev && docker push us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT }}/retrograde/retrograde:latest
45+ - name : Buildah build
46+ run : ./build.sh --image $IMAGE
47+ - name : Buildah push
48+ run : |
49+ gcloud auth print-access-token | buildah login -u oauth2accesstoken --password-stdin us-east1-docker.pkg.dev
50+ buildah push $IMAGE
5551 - name : Deploy new cloudrun revision
56- run : gcloud run deploy retrotools --image us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT }}/retrograde/retrograde:latest --platform managed --region=us-east1 --project=${{ secrets.GCP_PROJECT }}
52+ run : gcloud run deploy retrotools --image $IMAGE --platform managed --region=us-east1 --project=${{ secrets.GCP_PROJECT }}
5753
5854 deploy-firestore-rules :
5955 runs-on : ubuntu-latest
6056 needs : ci
6157 if : " !contains(github.event.head_commit.message, '[skip ci]') && github.ref == 'refs/heads/master'"
6258 steps :
63- - uses : actions/checkout@v1
59+ - uses : actions/checkout@v4
6460 - id : auth
6561 uses : google-github-actions/auth@v1
6662 with :
0 commit comments