forked from enisdenjo/graphql-sse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: codeql analysis and continuous integration
- Loading branch information
Showing
2 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: 'CodeQL analysis' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 23 * * 0' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Initialize | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: javascript | ||
- name: Perform analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache | ||
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-cache- | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Lint | ||
run: yarn lint | ||
|
||
type-check: | ||
name: Type check | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache | ||
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-cache- | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Type check | ||
run: yarn type-check | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16' | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .yarn/cache | ||
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn-cache- | ||
- name: Install | ||
run: yarn install --immutable | ||
- name: Test | ||
run: yarn test |