-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
- Loading branch information
1 parent
f6810f4
commit 0e55159
Showing
2 changed files
with
75 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 🔍️ CodeQL | ||
name: 👮♂️ Sanity checks | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
|
@@ -7,35 +7,87 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
analyse: | ||
prettify-n-lint: | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
# The permissions set for `actions` and `contents` are only | ||
# required for workflows in private repositories. | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
language: | ||
- javascript-typescript | ||
node_version: | ||
- 20 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialise CodeQL | ||
uses: github/codeql-action/init@v3 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: +security-and-quality | ||
version: latest | ||
run_install: false | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
- name: Get pnpm cache directory path | ||
id: pnpm-cache-dir-path | ||
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT | ||
|
||
- name: Perform CodeQL analysis | ||
uses: github/codeql-action/analyze@v3 | ||
- name: Restore pnpm cache | ||
uses: actions/cache@v4 | ||
id: pnpm-cache | ||
with: | ||
category: "/language:${{matrix.language}}" | ||
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
|
||
- name: Install pnpm project with a clean slate | ||
run: pnpm install --prefer-offline --frozen-lockfile | ||
|
||
- name: Prettier and lint | ||
run: pnpm lint:check | ||
|
||
codespell: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run codespell | ||
uses: codespell-project/[email protected] | ||
with: | ||
check_filenames: true | ||
skip: ./.git,pnpm-lock.yaml | ||
|
||
validate-links: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
ruby_version: | ||
- 3.3 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby_version }} | ||
bundler-cache: true | ||
|
||
- name: Install awesome_bot | ||
run: gem install awesome_bot | ||
|
||
- name: Validate URLs | ||
run: awesome_bot ./*.md contracts/src/*.sol contracts/test/*.sol --request-delay 0.4 --white-list http://localhost:24012,https://etherscan.io,https://snowtrace.io |
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