Skip to content

Commit

Permalink
Add audit github action.
Browse files Browse the repository at this point in the history
  • Loading branch information
tchalvak committed Jan 4, 2022
1 parent d7d53dd commit c2d3def
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Audit

on: [pull_request]

env:
WEBAPP_NAME: nwave # set this to your application's name
WEBAPP_PACKAGE_PATH: "." # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: "16.13.1" # set this to the node version to use
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_READ_TOKEN }}
CI: false
jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
#always-auth: true
#registry-url: "https://npm.pkg.github.com"
- name: Yarn packages audit
run: yarn npm audit
continue-on-error: true
- name: Install, configure, install the lighthouse auditor
run: |
# Check the node version
node --version
corepack enable
# Install the project, then...
# yarn workspaces run init-project
yarn init-project
yarn install --immutable
#yarn bootstrap
- name: Build
run: |
# Stop eslint from failing the build
rm .eslintrc.json
yarn build
- name: Run Lighthouse audit
run: npx @lhci/[email protected] autorun
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
"doc": "docs"
},
"scripts": {
"init-project": "echo 'no-op for now'",
"lint": "eslint --ext .jsx,.js deploy/www/js",
"prepare-unit-test-ci": "echo 'no-op for now'",
"start": "make build",
"build": "make build",
"watch": "livereload ./deploy/* ./deploy/www/* ./deploy/templates/* ./deploy/lib/control/* --debug",
"security-check": "yarn audit",
"prettier": "npx prettier --write .",
Expand All @@ -36,7 +38,7 @@
"url": "https://github.com/BitLucid/ninjawars/issues"
},
"engines": {
"node": ">=16.0.0"
"node": ">=16.13.0"
},
"homepage": "https://github.com/BitLucid/ninjawars#readme",
"devDependencies": {
Expand Down

0 comments on commit c2d3def

Please sign in to comment.