Skip to content

Commit

Permalink
ci(e2e): add lint check (#1225)
Browse files Browse the repository at this point in the history
* lint relayer

* chore(e2e): add prettier ignore file

* chore(justfile): make e2e lint configurable

* add lint action
  • Loading branch information
mayconamaroCW authored Jun 24, 2024
1 parent de13d8e commit 714a7fc
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,29 @@ jobs:

- name: Just lint-check
run: just lint-check -2024-01-01

e2e_lint:
name: E2E Lint
runs-on: ubuntu-latest
timeout-minutes: 5

concurrency:
group: ${{ github.workflow }}-e2e-${{ github.ref || github.run_id }}
cancel-in-progress: true

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions

- name: Set up Just
uses: extractions/setup-just@v2

- name: Just e2e-lint
run: |
npm --prefix ./e2e --silent install
just e2e-lint --check
11 changes: 11 additions & 0 deletions e2e/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Files and folders that Prettier must ignore
artifacts/**
cache/**
typechain-types/**
cloudwalk-contracts/*.sh
cloudwalk-contracts/repos/**
cloudwalk-contracts/patches/**
cloudwalk-contracts/integration/artifacts/**
cloudwalk-contracts/integration/cache/**
cloudwalk-contracts/integration/typechain-types/**
cloudwalk-contracts/integration/node_modules/**
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ e2e-clock-stratus-rocks:
exit $result_code

# E2E: Lint and format code
e2e-lint:
e2e-lint mode="--write":
#!/bin/bash
if [ -d e2e ]; then
cd e2e
fi
node_modules/.bin/prettier . --write
node_modules/.bin/prettier . {{ mode }} --ignore-unknown

# E2E: profiles rpc sync and generates a flamegraph
e2e-flamegraph:
Expand Down

0 comments on commit 714a7fc

Please sign in to comment.