Skip to content

build(repo): automate running fuel-core-nats locally #68

build(repo): automate running fuel-core-nats locally

build(repo): automate running fuel-core-nats locally #68

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, edited, reopened]
env:
CARGO_TERM_COLOR: always
CLICOLOR: 1
RUST_VERSION: 1.78.0
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validate-title:
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
types: |
arch
build
ci
docs
feat
fix
perf
refactor
test
scopes: |
repo
release
data-stream
sdk-rust
sdk-ts
lockfile:
name: Validate Lockfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: ./.github/actions/setup-rust
with:
toolchain: stable
target: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- run: cargo update --workspace --locked
commitlint:
name: Validating commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node && PNPM
uses: ./.github/actions/setup-node
- name: Install commitlint
run: |
npm install @commitlint/config-conventional
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --last --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: |
npx commitlint \
--from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose
lint:
name: Linting
if: "!startsWith(github.head_ref, 'releases/')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
target: wasm32-unknown-unknown
- name: Install dependencies
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cargo-sort@1.0.9
- name: Running linting
run: make lint