Skip to content

Commit

Permalink
Merge pull request #176 from Dahlgren/feature/github-actions
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
Dahlgren authored Jan 24, 2021
2 parents 239ce6f + 333209a commit 2a1fbcc
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 16 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CodeQL"

on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '45 21 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
language:
- javascript

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
65 changes: 65 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Node.js CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version:
- 14.x
- 12.x
- 10.x
- 8.x
- 6.x
- 4.x
os:
- ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache npm dependencies
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node-version }}-
- name: Install npm dependencies
run: npm install

- name: Copy example config
run: cp config.js.example config.js

- name: Lint
run: npm run lint

- name: Test
run: npm test
env:
CI: true

- name: Webpack
run: ./node_modules/.bin/webpack
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

0 comments on commit 2a1fbcc

Please sign in to comment.