Skip to content

Commit

Permalink
run integration test with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bunysae committed Nov 28, 2020
1 parent 6b410d7 commit a1c2df0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/integration.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
const test = require('ava');
const execa = require('execa');

test.before(async () => {
if (process.env.GITHUB_ACTIONS) {
console.log('running on Github actions');
await execa('git', ['config', 'user.name', 'Github actions']);
await execa('git', ['config', 'user.email', 'actions@github.com']);
await execa('git', ['submodule', 'update', '--init', '--recursive']);
}
});

test.after.always(async () => {
await execa('git', ['submodule', 'update', '--remote']);
});

test('Integration tests', async t => {
await execa('ava', {cwd: 'integration-test'});
await execa('npx', ['ava'], {cwd: 'integration-test'});
t.pass();
});

0 comments on commit a1c2df0

Please sign in to comment.