From 3cd457d7ab5665ec013fbb059578b1f82ec6e87a Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Sat, 28 Nov 2020 09:03:04 +0000 Subject: [PATCH 1/6] run integration test with github actions --- test/integration.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/integration.js b/test/integration.js index c486a9a3..b872d192 100644 --- a/test/integration.js +++ b/test/integration.js @@ -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(); }); From 2565f55b352ef59ec7c6fdc907f26f4eaca4a9b2 Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Sun, 6 Dec 2020 14:49:08 +0000 Subject: [PATCH 2/6] run integration test with github actions --- .github/workflows/main.yml | 2 ++ integration-test | 2 +- test/integration.js | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1870cf7..f396afdc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,8 @@ jobs: - 10 steps: - uses: actions/checkout@v2 + with: + submodules: 'true' - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} diff --git a/integration-test b/integration-test index ad5e6e37..1771d17d 160000 --- a/integration-test +++ b/integration-test @@ -1 +1 @@ -Subproject commit ad5e6e3776cb3e2b396e7d3f5a6a7a4b5fa0b83e +Subproject commit 1771d17d524bb33a4cfc99df36000a4e460fcde5 diff --git a/test/integration.js b/test/integration.js index b872d192..b46e242d 100644 --- a/test/integration.js +++ b/test/integration.js @@ -6,7 +6,6 @@ test.before(async () => { 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']); } }); From 52ee799640f2683bf3a0e7463278cd007d96e65a Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet <53788417+bunysae@users.noreply.github.com> Date: Mon, 7 Dec 2020 17:46:03 +0100 Subject: [PATCH 3/6] Update .github/workflows/main.yml Co-authored-by: Sindre Sorhus --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f396afdc..badd6fe0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - submodules: 'true' + submodules: true - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} From 0da9144470f5c6778db9ccf28793f384ffc8dc89 Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Sat, 19 Dec 2020 11:39:50 +0000 Subject: [PATCH 4/6] Integration test: setup git user --- .github/workflows/main.yml | 1 + test/integration.js | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f396afdc..b6245d01 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,5 +20,6 @@ jobs: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - uses: fregante/setup-git-user@v1 - run: npm install - run: npm test diff --git a/test/integration.js b/test/integration.js index b46e242d..a26daab7 100644 --- a/test/integration.js +++ b/test/integration.js @@ -1,14 +1,6 @@ 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']); - } -}); - test.after.always(async () => { await execa('git', ['submodule', 'update', '--remote']); }); From 3ccebab0a29f641ad59869d4bf0966ed40d08146 Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Sat, 19 Dec 2020 11:47:40 +0000 Subject: [PATCH 5/6] Integration test: setup git user --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fd2e5dd..e8d6ac83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - uses: fregante/setup-git-user@v1 + - run: git config --global user.email "actions@github.com" + - run: git config --global user.name "Github actions" - run: npm install - run: npm test From 5671cce3452c2689671368b6073b1cbd557b8b73 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 19 Dec 2020 22:35:21 +0700 Subject: [PATCH 6/6] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8d6ac83..96917392 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: git config --global user.email "actions@github.com" - - run: git config --global user.name "Github actions" + - run: git config --global user.name "Github Actions" + - run: git config --global user.email "actions@users.noreply.github.com" - run: npm install - run: npm test