mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-29 03:25:33 -04:00
remove CodeQL action
This commit is contained in:
+21
-42
@@ -1,4 +1,4 @@
|
||||
name: Run tests
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -7,68 +7,44 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
|
||||
# https://github.com/actions/cache/issues/60
|
||||
- name: Get yarn cache location
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- run: yarn install --no-ignore-optional --frozen-lockfile
|
||||
- run: yarn lint
|
||||
|
||||
lighthouse:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
# "[skip ci]" also causes Netlify to skip, so these are automatically in harmony
|
||||
# https://docs.netlify.com/site-deploys/manage-deploys/#skip-a-deploy
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
steps:
|
||||
- name: Wait for Netlify
|
||||
run: npx netlify-cli watch
|
||||
|
||||
lighthouse:
|
||||
runs-on: ubuntu-latest
|
||||
needs: deploy
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
- run: npm install -g netlify-cli @lhci/cli
|
||||
- name: Wait for Netlify
|
||||
run: netlify watch
|
||||
env:
|
||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||
lfs: false
|
||||
- name: Audit deploy preview
|
||||
if: github.event_name == 'pull_request'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
lhci autorun --config=./.lighthouserc.json \
|
||||
npx @lhci/cli autorun --config=./.lighthouserc.json \
|
||||
--collect.url=https://deploy-preview-${{ github.event.number }}--jakejarvis.netlify.com/ \
|
||||
--collect.url=https://deploy-preview-${{ github.event.number }}--jakejarvis.netlify.com/notes/how-to-pull-request-fork-github/ \
|
||||
--collect.url=https://deploy-preview-${{ github.event.number }}--jakejarvis.netlify.com/notes/how-to-pull-request-fork-github/amp.html
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
- name: Audit jarv.is
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
lhci autorun --config=./.lighthouserc.json \
|
||||
npx @lhci/cli autorun --config=./.lighthouserc.json \
|
||||
--collect.url=https://jarv.is/ \
|
||||
--collect.url=https://jarv.is/notes/how-to-pull-request-fork-github/ \
|
||||
--collect.url=https://jarv.is/notes/how-to-pull-request-fork-github/amp.html
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
- name: Upload results as artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
@@ -103,7 +79,10 @@ jobs:
|
||||
${{ runner.os }}-yarn-
|
||||
- name: Install deps
|
||||
run: yarn install --no-ignore-optional --frozen-lockfile
|
||||
- name: Build site preview
|
||||
- name: Lint
|
||||
continue-on-error: true
|
||||
run: yarn lint
|
||||
- name: Build
|
||||
run: yarn build:preview
|
||||
- name: Percy snapshots
|
||||
uses: percy/snapshot-action@v0.1.0
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# https://github.com/github/codeql-action/blob/master/README.md#usage
|
||||
|
||||
name: Code scanning
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 10 * * 3' # every Wednesday at 10 AM UTC == 6 AM EDT
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
# CodeQL runs on ubuntu-latest and windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Allow skipping with [skip ci] (doesn't apply to PRs and crons)
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]') || github.event_name != 'push'"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
Reference in New Issue
Block a user