fix: Add metadata write perm for docker builds in CI #249
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main, dev] | |
pull_request_review: | |
types: [submitted] | |
env: | |
SQLX_OFFLINE: true | |
jobs: | |
check: | |
name: Check | |
if: github.event.review.state == 'approved' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 # we need go to build go-waku | |
with: | |
go-version: "1.20" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.82.0 | |
default: true | |
override: true | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: check | |
test: | |
name: Test Suite | |
if: github.event.review.state == 'approved' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 # we need go to build go-waku | |
with: | |
go-version: "1.20" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.82.0 | |
default: true | |
override: true | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: build | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: test | |
lints: | |
name: Rust lints | |
if: github.event.review.state == 'approved' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 # we need go to build go-waku | |
with: | |
go-version: "1.20" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.82.0 | |
override: true | |
components: rustfmt, clippy | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: clippy | |
integration-tests: | |
name: E2E Tests | |
if: github.event.review.state == 'approved' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.82.0 | |
override: true | |
- name: Run E2E Tests | |
run: cargo run -p test-runner |