Skip to content

Commit

Permalink
Merge pull request #9 from Mearman/github-ci
Browse files Browse the repository at this point in the history
add GitHub CI
  • Loading branch information
DonTizi authored Sep 2, 2024
2 parents 78df0f6 + 4a638e7 commit 660a56e
Show file tree
Hide file tree
Showing 5 changed files with 13,167 additions and 0 deletions.
Binary file removed .DS_Store
Binary file not shown.
63 changes: 63 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Node.js CI

on:
push:
pull_request:
branches:
- "main"

jobs:
audit:
name: Audit packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Audit packages
run: npm audit --audit-level moderate
env:
CI: true

analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 18.x
- 20.x
- 22.x
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Next.js cache # see https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching#github-actions
uses: actions/cache@v4
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- run: npm ci
- run: npm run build --if-present
- run: npm run test --if-present
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules/
.venv/
venv/

.DS_Store
.next/
Loading

0 comments on commit 660a56e

Please sign in to comment.