From 77de30a504fc465df096e4263b9fab9bd1e9b1dd Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 13:19:42 +0200 Subject: [PATCH 01/13] chore(gh-actions): add simple test --- .github/workflows/run-test.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/run-test.yml diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml new file mode 100644 index 0000000..b31132e --- /dev/null +++ b/.github/workflows/run-test.yml @@ -0,0 +1,26 @@ +name: run-test + +on: push + +jobs: + # general test run + test: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + node-version: [8.x, 10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - run: git submodule update --recursive --init + - run: npm install + - run: npm install ext/protagonist + - run: npm test From 76d5faa7300324cc1df228fa2e494a6433e7e38a Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 16:20:24 +0200 Subject: [PATCH 02/13] chore(gh-actions): add missing step --- .github/workflows/run-test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index b31132e..58eb97f 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -3,6 +3,12 @@ name: run-test on: push jobs: + + # build + build: + + runs-on: + # general test run test: @@ -22,5 +28,10 @@ jobs: - run: git submodule update --recursive --init - run: npm install + - run: + command: | + cd ext/protagonist/drafter + ./configure + make drafter - run: npm install ext/protagonist - run: npm test From ea5ac150a7a17b5ee3c73c4a511c77de05078064 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 16:41:58 +0200 Subject: [PATCH 03/13] chore(gh-actions): add build with stored artifact --- .github/workflows/run-test.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 58eb97f..2ef4a23 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -7,7 +7,24 @@ jobs: # build build: - runs-on: + container: + image: apiaryio/emcc:1.38.11 + + steps: + - run: apt-get update && apt-get install -y git-core + - uses: actions/checkout@v2 + - run: git submodule update --recursive --init + - run: npm install + - run: ./scripts/wrap.js + - run: ./scripts/emcbuild.sh + - name: keeping some data stored + uses: actions/upload-artifact@v2 + with: + name: drafter + path: + - drafter.js + - drafter.js.mem + - drafter.nomem.js # general test run test: @@ -27,6 +44,11 @@ jobs: node-version: ${{ matrix.node-version }} - run: git submodule update --recursive --init + - name: get stored artifacts + uses: actions/download-artifact@v2 + with: + name: drafter + - run: npm install - run: command: | From 3ad2775d0a4fc73a38bc7c149302f1de21620f69 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 16:50:14 +0200 Subject: [PATCH 04/13] chore(gh-actions): add python setup --- .github/workflows/run-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 2ef4a23..b8810bd 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -50,10 +50,13 @@ jobs: name: drafter - run: npm install + - uses: actions/setup-python@v2 + with: + python-version: '2.x' - run: - command: | + command:| cd ext/protagonist/drafter - ./configure + node ./configure make drafter - run: npm install ext/protagonist - run: npm test From 5b061ca4da312dd934d66bfd723e2fc0cbc967c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Natalie=20Mike=C5=A1ov=C3=A1?= Date: Fri, 28 Aug 2020 17:04:40 +0200 Subject: [PATCH 05/13] chore(gh-actions): add missing runs-on --- .github/workflows/run-test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index b8810bd..0ffd9d1 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -7,6 +7,8 @@ jobs: # build build: + runs-on: ubuntu-latest + container: image: apiaryio/emcc:1.38.11 @@ -21,10 +23,10 @@ jobs: uses: actions/upload-artifact@v2 with: name: drafter - path: - - drafter.js - - drafter.js.mem - - drafter.nomem.js + path: | + drafter.js + drafter.js.mem + drafter.nomem.js # general test run test: From 9d369e07d34dc8024417753b17c49969bb93cbfc Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 17:09:23 +0200 Subject: [PATCH 06/13] chore(gh-actions): add jobs dependency --- .github/workflows/run-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 0ffd9d1..0eae428 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -38,6 +38,8 @@ jobs: os: [ubuntu-latest, macos-latest] node-version: [8.x, 10.x, 12.x, 14.x] + needs: build + steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From b0342374793fc918211f50a2b7b45c8bbbe8e001 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 20:38:03 +0200 Subject: [PATCH 07/13] chore(gh-actions): use node for build --- .github/workflows/run-test.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 0eae428..34001f0 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -11,10 +11,18 @@ jobs: container: image: apiaryio/emcc:1.38.11 - + + strategy: + matrix: + node-version: [12.x] + steps: - run: apt-get update && apt-get install -y git-core - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} - run: git submodule update --recursive --init - run: npm install - run: ./scripts/wrap.js @@ -39,7 +47,7 @@ jobs: node-version: [8.x, 10.x, 12.x, 14.x] needs: build - + steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} From 1d1fcc33b84fc2fcef453140453ad4e7f394d037 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 28 Aug 2020 21:04:47 +0200 Subject: [PATCH 08/13] chore(gh-actions): add git actions --- .github/workflows/run-test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 34001f0..11c4f54 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -19,11 +19,10 @@ jobs: steps: - run: apt-get update && apt-get install -y git-core - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - name: Use Git Actions + uses: srt32/git-actions@v0.0.3 with: - node-version: ${{ matrix.node-version }} - - run: git submodule update --recursive --init + args: git submodule update --recursive --init - run: npm install - run: ./scripts/wrap.js - run: ./scripts/emcbuild.sh From 73803c4a5e5f2d3fbfee601bd217198a8ef51239 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 31 Aug 2020 11:49:01 +0200 Subject: [PATCH 09/13] chore(gh-actions): use checkout v1 --- .github/workflows/run-test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 11c4f54..7c1af7e 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -9,16 +9,11 @@ jobs: runs-on: ubuntu-latest - container: - image: apiaryio/emcc:1.38.11 - - strategy: - matrix: - node-version: [12.x] + container: apiaryio/emcc:1.38.11 steps: - run: apt-get update && apt-get install -y git-core - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 - name: Use Git Actions uses: srt32/git-actions@v0.0.3 with: @@ -48,7 +43,7 @@ jobs: needs: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: From 35ecf4cedb45d484e949e8cf8323c627a45309b9 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 31 Aug 2020 15:17:53 +0200 Subject: [PATCH 10/13] chore(gh-actions): copy .emscripten to home folder --- .github/workflows/run-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 7c1af7e..e2a01cc 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -19,6 +19,7 @@ jobs: with: args: git submodule update --recursive --init - run: npm install + - run: cp /root/.emscripten ~/ - run: ./scripts/wrap.js - run: ./scripts/emcbuild.sh - name: keeping some data stored From aad072823bbe0b740d1c6d5d7e94746abd60a97c Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 31 Aug 2020 16:02:34 +0200 Subject: [PATCH 11/13] chore(gh-actions): add correct path to artifacts --- .github/workflows/run-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index e2a01cc..ed63e26 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -27,9 +27,9 @@ jobs: with: name: drafter path: | - drafter.js - drafter.js.mem - drafter.nomem.js + lib/drafter.js + lib/drafter.js.mem + lib/drafter.nomem.js # general test run test: From d8b618e6bfc77bbedde8b03f80e7e10bdaf1a769 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 31 Aug 2020 16:13:57 +0200 Subject: [PATCH 12/13] chore(gh-actions): remove command --- .github/workflows/run-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index ed63e26..4cd34ad 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -60,10 +60,9 @@ jobs: - uses: actions/setup-python@v2 with: python-version: '2.x' - - run: - command:| + - run: | cd ext/protagonist/drafter - node ./configure + ./configure make drafter - run: npm install ext/protagonist - run: npm test From 98044024a1f74f71d44c858cedf290865bd3b431 Mon Sep 17 00:00:00 2001 From: Natalie Date: Wed, 2 Sep 2020 21:24:16 +0200 Subject: [PATCH 13/13] chore(gh-actions): fix artifact path --- .github/workflows/run-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 4cd34ad..035caec 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -26,10 +26,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: drafter - path: | - lib/drafter.js - lib/drafter.js.mem - lib/drafter.nomem.js + path: lib # general test run test: @@ -39,7 +36,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - node-version: [8.x, 10.x, 12.x, 14.x] + node-version: [8.x, 10.x, 12.x] needs: build @@ -55,6 +52,7 @@ jobs: uses: actions/download-artifact@v2 with: name: drafter + path: lib - run: npm install - uses: actions/setup-python@v2