Skip to content

Commit 12fe7cc

Browse files
jimmywartingvoxpelli
authored andcommitted
from travis to gh actions
1 parent 2c02104 commit 12fe7cc

File tree

4 files changed

+85
-6
lines changed

4 files changed

+85
-6
lines changed

.github/workflows/old-test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Special test for the oldest version of Node.js that we "support"
2+
# even though the linter won't actually run. Test that the command
3+
# line program exits cleanly.
4+
5+
name: Old test
6+
7+
on:
8+
push:
9+
branches: [master]
10+
pull_request:
11+
branches: [master]
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [0.10.48]
20+
21+
steps:
22+
- name: Checkout project
23+
uses: actions/[email protected]
24+
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/[email protected]
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Cache Node dependencies
31+
uses: actions/[email protected]
32+
with:
33+
path: ~/.npm
34+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
35+
restore-keys: |
36+
${{ runner.os }}-node-
37+
38+
- name: Install dependencies
39+
run: npm install
40+
41+
- name: Test that the command line program exits cleanly.
42+
run: ./bin/cmd.js
43+
shell: bash

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [12.20.0, 14.13.1, 16.0.0]
16+
fail-fast: false
17+
18+
steps:
19+
- name: Checkout project
20+
uses: actions/checkout@v2
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: Cache Node dependencies
28+
uses: actions/[email protected]
29+
with:
30+
path: ~/.npm
31+
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-node-
34+
35+
- name: Install dependencies
36+
run: npm install
37+
38+
- name: Run tests
39+
run: npm test

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
JavaScript Standard Style with custom tweaks
44

55
[![npm][npm-image]][npm-url]
6-
[![travis][travis-image]][travis-url]
6+
[![tests][tests-image]][tests-url]
77
[![standard][standard-image]][standard-url]
88

99
[npm-image]: https://img.shields.io/npm/v/standardx.svg?style=flat-square
1010
[npm-url]: https://www.npmjs.com/package/standardx
11-
[travis-image]: https://img.shields.io/travis/standard/standardx.svg?style=flat-square
12-
[travis-url]: https://travis-ci.org/standard/standardx
11+
[tests-image]: https://github.com/standard/standardx/actions/workflows/test.yml/badge.svg
12+
[tests-url]: https://github.com/standard/standardx/actions/workflows/test.yml
1313
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
1414
[standard-url]: http://npm.im/standard
1515

0 commit comments

Comments
 (0)