Skip to content

feat(proto, conductor, cd)!: changes for Forma migration #7394

feat(proto, conductor, cd)!: changes for Forma migration

feat(proto, conductor, cd)!: changes for Forma migration #7394

Workflow file for this run

name: Lint
on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
merge_group:
push:
branches:
- "main"
jobs:
run_checker:
uses: ./.github/workflows/reusable-run-checker.yml
proto:
runs-on: ubuntu-latest
needs: run_checker
if: needs.run_checker.outputs.run_lint_proto == 'true'
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1
with:
version: "1.32.0"
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
- run: buf format -d --exit-code
if: always()
# Run breaking changes against each module, running against whole workspace
# fails if new packages are added
- uses: bufbuild/buf-breaking-action@v1
if: always()
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'allow-breaking-proto') }}
with:
input: "proto/primitives"
against: "buf.build/astria/primitives"
- uses: bufbuild/buf-breaking-action@v1
if: always()
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'allow-breaking-proto') }}
with:
input: "proto/executionapis"
against: "buf.build/astria/execution-apis"
- uses: bufbuild/buf-breaking-action@v1
if: always()
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'allow-breaking-proto') }}
with:
input: "proto/sequencerblockapis"
against: "buf.build/astria/sequencerblock-apis"
- uses: bufbuild/buf-breaking-action@v1
if: always()
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'allow-breaking-proto') }}
with:
input: "proto/protocolapis"
against: "buf.build/astria/protocol-apis"
- uses: bufbuild/buf-breaking-action@v1
if: always()
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'allow-breaking-proto') }}
with:
input: "proto/composerapis"
against: "buf.build/astria/composer-apis"
rust:
runs-on: ubuntu-22.04
needs: run_checker
if: needs.run_checker.outputs.run_lint_rust == 'true'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-09-15
components: rustfmt
- name: run rustfmt
run: cargo +nightly-2024-09-15 fmt --all -- --check
toml:
runs-on: ubuntu-22.04
needs: run_checker
if: needs.run_checker.outputs.run_lint_toml == 'true'
steps:
- uses: actions/checkout@v4
- name: download taplo
run: |
curl -fsSL https://github.com/tamasfe/taplo/releases/download/0.8.1/taplo-full-linux-x86_64.gz \
| gzip -d - \
| install -m 755 /dev/stdin /usr/local/bin/taplo
- name: run taplo
run: taplo format --check
markdown:
runs-on: ubuntu-22.04
needs: run_checker
if: needs.run_checker.outputs.run_lint_markdown == 'true'
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v11
charts:
runs-on: ubuntu-latest
needs: run_checker
if: needs.run_checker.outputs.run_lint_charts == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
check-latest: true
- name: Setup helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add blockscout https://blockscout.github.io/helm-charts
helm dependency build charts/evm-rollup
helm dependency build charts/evm-stack
helm dependency build charts/sequencer
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --target-branch ${{ github.event.repository.default_branch }}
lint:
needs: [proto, rust, toml, markdown, charts]
if: ${{ always() && !cancelled() }}
uses: ./.github/workflows/reusable-success.yml
with:
success: ${{ !contains(needs.*.result, 'failure') }}