Skip to content

Rhoop/testnet deploy #2246

Rhoop/testnet deploy

Rhoop/testnet deploy #2246

Workflow file for this run

name: Lint
on:
pull_request:
push:
branches:
- main
jobs:
check_for_changes:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: same_content_newer
lint_solidity:
needs: check_for_changes
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3
- name: Cache Foundry toolchain
uses: actions/cache@v2
with:
path: ~/.foundry
key: ${{ runner.os }}-foundry-${{ hashFiles('**/foundry.toml') }}
restore-keys: |
${{ runner.os }}-foundry-
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run forge install
run: forge install
- name: Check if forge fmt was run
run: forge fmt --check
lint_bash:
needs: check_for_changes
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./sbin
steps:
- uses: actions/checkout@v3
- name: Install shfmt
run: sudo apt-get install -y shfmt
- name: Run shfmt
run: shfmt -d .
lint_ts_scripts:
needs: check_for_changes
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./contracts
steps:
- uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Run prettier
run: npx prettier scripts/ -c