summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-18 01:26:20 -0500
committerseth <[email protected]>2023-11-18 06:31:50 +0000
commit3eb6be089e42ed34df19a5b04fea2e1cd457a933 (patch)
tree45596cecbf841055e2e53b622d44a32cca7b30f3 /.github
parent15e3fb76ee575a098274e1c74f2bb90138574025 (diff)
actions: split eslint workflow from CI
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml57
-rw-r--r--.github/workflows/eslint.yaml42
-rw-r--r--.github/workflows/update-flake.yaml12
3 files changed, 59 insertions, 52 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 26c7aaa..b611c7b 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -6,86 +6,49 @@ on:
jobs:
build:
- runs-on: ubuntu-latest
+ runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- - name: setup pnpm
+ - name: Setup pnpm
uses: pnpm/action-setup@v2
- - name: setup node
+ - name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- - name: install deps
+ - name: Install dependencies
run: pnpm install --frozen-lockfile
- - name: run build
+ - name: Run build
run: pnpm build
- lint:
- runs-on: ubuntu-latest
-
- permissions:
- security-events: write
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
-
- - name: setup pnpm
- uses: pnpm/action-setup@v2
-
- - name: setup node
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
- cache-dependency-path: pnpm-lock.yaml
-
- - name: install deps
- run: pnpm install --frozen-lockfile
-
- - name: run lint
- run: pnpm run lint -f @microsoft/eslint-formatter-sarif -o /tmp/lint.sarif
- continue-on-error: true
-
- - name: strip suppressed results
- run: pnpm dlx @ryanccn/sarif-strip-suppressed /tmp/lint.sarif
-
- - name: upload results
- uses: github/codeql-action/upload-sarif@v2
- with:
- sarif_file: /tmp/lint.sarif
- wait-for-processing: true
-
format:
- runs-on: ubuntu-latest
+ runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- - name: setup pnpm
+ - name: Setup pnpm
uses: pnpm/action-setup@v2
- - name: setup node
+ - name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- - name: install deps
+ - name: Install dependencies
run: pnpm install --frozen-lockfile
- - name: run prettier
+ - name: Run Prettier
run: pnpm exec prettier --check .
diff --git a/.github/workflows/eslint.yaml b/.github/workflows/eslint.yaml
new file mode 100644
index 0000000..2fdb036
--- /dev/null
+++ b/.github/workflows/eslint.yaml
@@ -0,0 +1,42 @@
+name: ESLint
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+
+jobs:
+ eslint:
+ name: Run ESLint scan
+ runs-on: ubuntu-latest
+
+ permissions:
+ security-events: write
+
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v2
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ cache: pnpm
+ cache-dependency-path: pnpm-lock.yaml
+
+ - name: Install Dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Run ESLint
+ continue-on-error: true
+ run: pnpm run lint --format @microsoft/eslint-formatter-sarif --output-file /tmp/results.sarif
+
+ - name: Upload Results
+ uses: github/codeql-action/upload-sarif@v2
+ with:
+ sarif_file: /tmp/results.sarif
+ wait-for-processing: true
diff --git a/.github/workflows/update-flake.yaml b/.github/workflows/update-flake.yaml
index 0ff5bb9..41eb4fb 100644
--- a/.github/workflows/update-flake.yaml
+++ b/.github/workflows/update-flake.yaml
@@ -1,4 +1,4 @@
-name: update flake.lock
+name: Update flake.lock
on:
schedule:
@@ -7,7 +7,7 @@ on:
jobs:
update:
- runs-on: ubuntu-latest
+ runs-on: "ubuntu-latest"
permissions:
contents: write
@@ -15,15 +15,17 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: nixbuild/nix-quick-install-action@v26
- - name: update lockfile
+ - name: Install Nix
+ uses: nixbuild/nix-quick-install-action@v26
+
+ - name: Update lockfile
uses: DeterminateSystems/update-flake-lock@v20
id: update
with:
token: ${{ github.token }}
- - name: merge pr
+ - name: Merge PR
shell: bash
run: gh pr merge --rebase "$PR_ID"
env: