Skip to content

Commit

Permalink
Add github action "test"
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Mar 4, 2020
1 parent ed8cdfa commit 9a062a6
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 31 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cross-OS Tests

on: [push]

env:
GITHUB_TOKEN: 1
GITLAB_TOKEN: 1

jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
node:
- 10
- 12

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (Node v${{ matrix.node }})

steps:
- uses: actions/checkout@v2
- run: git config --global user.name User
- run: git config --global user.email user@example.org
- run: npm install
- run: npm test
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Please keep the following in mind:
- To match the existing code styling, use `npm run format` before committing code.
- Make sure the tests pass (run `npm test`). Your changes probably deserve new tests as well.
- Remember that this project is cross-platform compatible (macOS, Windows, Linux), and that it runs in different
versions of Node. On PR submission, [Travis CI](https://travis-ci.org/release-it/release-it) will run the tests in
multiple supported platforms and Node.js versions.
versions of Node. On PR submission, a [GitHub Action](https://github.com/release-it/release-it/actions) will run the
tests in multiple supported platforms and Node.js versions.

Unsure about whether you should open a pull request? Feel free to discuss it first in a ticket.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Extend with [plugins](#plugins)
- Release from any [CI/CD environment](./docs/ci.md)

[![Build Status](https://api.travis-ci.org/release-it/release-it.svg?branch=master)](https://travis-ci.org/release-it/release-it)
[![Action Status](https://github.com/release-it/release-it/workflows/Cross-OS%20Tests/badge.svg)](https://github.com/release-it/release-it/actions)
[![npm version](https://badge.fury.io/js/release-it.svg)](https://badge.fury.io/js/release-it)
[![codecov](https://codecov.io/gh/release-it/release-it/branch/master/graph/badge.svg)](https://codecov.io/gh/release-it/release-it)

Expand Down
5 changes: 1 addition & 4 deletions test/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ test.serial('should commit and tag with quoted characters', async t => {
}
{
const { stdout } = sh.exec('git tag -n99');
t.is(
stdout.trim(),
`1.0.0 Release 1.0.0${EOL} ${EOL} - Foo's${EOL} - "$bar"${EOL} - '$baz'${EOL} - foo`
);
t.is(stdout.trim(), `1.0.0 Release 1.0.0\n \n - Foo's\n - "$bar"\n - '$baz'\n - foo`);
}
});

Expand Down
4 changes: 3 additions & 1 deletion test/shell.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
const test = require('ava');
const sh = require('shelljs');
const Shell = require('../lib/shell');
const { factory } = require('./util');

const cwd = process.cwd();
const { stdout } = sh.exec('pwd');
const cwd = stdout.trim();

const shell = factory(Shell);

Expand Down

0 comments on commit 9a062a6

Please sign in to comment.