Skip to content

Commit

Permalink
ci: replace Travis with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj authored and okonet committed Apr 4, 2020
1 parent 226ccdb commit 4a0d2dd
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test

on:
push:
# Run on pushes to specific branches
branches:
- master
- next
- beta
- alpha
# Do not run on tags
tags-ignore:
- "*"
pull_request:
# Run on to branches with an open PR
branches:
- "*"

jobs:
test:
strategy:
matrix:
# Test with Node.js v10 (LTS), v12 (LTS), and v13 (latest)
node: [10, 12, 13]
# Test with Ubuntu and macOS
os: [ubuntu-latest, macOS-latest]
name: Node.js v${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
# Get yarn's cache dir path
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# Cache the above yarn cache dir
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ runner.os }}-${{ runner.node }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-${{ runner.node }}-
- run: node --version
- run: yarn --version
- run: git --version
- run: yarn
- run: yarn test
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

0 comments on commit 4a0d2dd

Please sign in to comment.