Skip to content

Commit

Permalink
👷 Fix shit
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Feb 26, 2024
1 parent f6810f4 commit 0e55159
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 19 deletions.
90 changes: 71 additions & 19 deletions .github/workflows/checks.yml
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]

Expand All @@ -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
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: 🔍️ CodeQL

on: [push, pull_request, workflow_dispatch]

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

jobs:
analyse:
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 0e55159

Please sign in to comment.