Skip to content

Commit

Permalink
ci: codeql analysis and continuous integration
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Aug 20, 2021
1 parent e74335a commit 8a51f9e
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/codeql-analysis.yml
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
80 changes: 80 additions & 0 deletions .github/workflows/continuous-integration.yml
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

0 comments on commit 8a51f9e

Please sign in to comment.