-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run integration test with github actions
- Loading branch information
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', '--global', 'user.name', 'Github actions']); | ||
await execa('git', ['config', '--global', '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(); | ||
}); |