From 64fd4c4bde318230ecb3a96d2ed1d0ad71e1ea9c Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Sun, 12 Dec 2021 13:11:46 -0700 Subject: [PATCH 1/8] canary test workflow --- .github/workflows/canary.yml | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/canary.yml diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml new file mode 100644 index 00000000..504fea43 --- /dev/null +++ b/.github/workflows/canary.yml @@ -0,0 +1,63 @@ +name: canary +on: + - pull_request + - push +jobs: + main: + name: '${{matrix.node}} on ${{matrix.os}}' + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v2 + - uses: dcodeIO/setup-node-nvm@master + with: + node-version: ${{matrix.node}} + - run: npm install -g npm + - run: npm install + - run: npm run build + + - name: checkout mdast-util-from-markdown + uses: actions/checkout@v2 + with: + repository: syntax-tree/mdast-util-from-markdown + path: canary/mdast-util-from-markdown + - name: test mdast-util-from-markdown + run: | + npm install + npx rimraf "**/micromark" + npx rimraf "**/micromark-util-*" + npm test + working-directory: canary/mdast-util-from-markdown + + - name: checkout remark + uses: actions/checkout@v2 + with: + repository: remarkjs/remark + path: canary/remark + - name: test remark + run: | + npm install + npx rimraf "**/micromark" + npx rimraf "**/micromark-util-*" + npm test + working-directory: canary/remark + + - name: checkout react-markdown + uses: actions/checkout@v2 + with: + repository: remarkjs/react-markdown + path: canary/react-markdown + - name: test react-markdown + run: | + npm install + npx rimraf "**/micromark" + npx rimraf "**/micromark-util-*" + npm test + working-directory: canary/react-markdown + strategy: + matrix: + os: + - ubuntu-latest + - windows-latest + node: + - lts/erbium + - node From 28e83d5757d95beb70f987a60bfcd09f7a9466c8 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Sun, 12 Dec 2021 15:54:10 -0700 Subject: [PATCH 2/8] test each downstream package in its own matrix step --- .github/workflows/canary.yml | 60 ++++++++++++++---------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 504fea43..8219b5e9 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -3,57 +3,39 @@ on: - pull_request - push jobs: - main: - name: '${{matrix.node}} on ${{matrix.os}}' + canary: + name: testing ${{matrix.package}} with ${{matrix.node}} on ${{matrix.os}} runs-on: ${{matrix.os}} steps: - - uses: actions/checkout@v2 - - uses: dcodeIO/setup-node-nvm@master + - name: checkout micromark + uses: actions/checkout@v2 + - name: setup node + uses: dcodeIO/setup-node-nvm@master with: node-version: ${{matrix.node}} - - run: npm install -g npm - - run: npm install - - run: npm run build + - name: update npm + run: npm install -g npm + - name: install micromark + run: npm install + - name: build micromark + run: npm run build - - name: checkout mdast-util-from-markdown - uses: actions/checkout@v2 - with: - repository: syntax-tree/mdast-util-from-markdown - path: canary/mdast-util-from-markdown - - name: test mdast-util-from-markdown - run: | - npm install - npx rimraf "**/micromark" - npx rimraf "**/micromark-util-*" - npm test - working-directory: canary/mdast-util-from-markdown - - - name: checkout remark + - name: checkout ${{matrix.package}} uses: actions/checkout@v2 with: - repository: remarkjs/remark - path: canary/remark - - name: test remark + repository: ${{matrix.package}} + path: canary/${{matrix.package}} + - name: test ${{matrix.package}} run: | npm install npx rimraf "**/micromark" npx rimraf "**/micromark-util-*" npm test - working-directory: canary/remark + working-directory: canary/${{matrix.package}} - - name: checkout react-markdown - uses: actions/checkout@v2 - with: - repository: remarkjs/react-markdown - path: canary/react-markdown - - name: test react-markdown - run: | - npm install - npx rimraf "**/micromark" - npx rimraf "**/micromark-util-*" - npm test - working-directory: canary/react-markdown strategy: + fail-fast: false + max-parallel: 2 matrix: os: - ubuntu-latest @@ -61,3 +43,7 @@ jobs: node: - lts/erbium - node + package: + - syntax-tree/mdast-util-from-markdown + - remarkjs/remark + - remarkjs/react-markdown From 4708456bf61e40f62e1050d7fb2bc334438fb999 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Thu, 23 Dec 2021 11:16:06 -0700 Subject: [PATCH 3/8] test: drop windows from canary matrix --- .github/workflows/canary.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 8219b5e9..a73e078d 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -39,7 +39,6 @@ jobs: matrix: os: - ubuntu-latest - - windows-latest node: - lts/erbium - node From 2b1818870598f258219ed8a7bc51a31c23fa212a Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 24 Dec 2021 08:36:02 -0700 Subject: [PATCH 4/8] test: cleanup canary test script --- .github/workflows/canary.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index a73e078d..b534482e 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -4,7 +4,7 @@ on: - push jobs: canary: - name: testing ${{matrix.package}} with ${{matrix.node}} on ${{matrix.os}} + name: testing ${{matrix.package}} runs-on: ${{matrix.os}} steps: - name: checkout micromark @@ -13,13 +13,11 @@ jobs: uses: dcodeIO/setup-node-nvm@master with: node-version: ${{matrix.node}} - - name: update npm - run: npm install -g npm - - name: install micromark - run: npm install - - name: build micromark - run: npm run build - + - name: setup micromark + run: | + npm install -g npm + npm install + npm run build - name: checkout ${{matrix.package}} uses: actions/checkout@v2 with: @@ -40,7 +38,6 @@ jobs: os: - ubuntu-latest node: - - lts/erbium - node package: - syntax-tree/mdast-util-from-markdown From 10b47f32d0e9e630f64a2f6dfbf267b3281019b3 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 24 Dec 2021 08:38:48 -0700 Subject: [PATCH 5/8] test: add micromark extensions to canary suite --- .github/workflows/canary.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index b534482e..17b09cbd 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -40,6 +40,9 @@ jobs: node: - node package: + - micromark/micromark-extension-gfm + - micromark/micromark-extension-directive + - micromark/micromark-extension-mdx - syntax-tree/mdast-util-from-markdown - remarkjs/remark - remarkjs/react-markdown From 42e59766e90146a69e73548dfa2ba6356724aa04 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 24 Dec 2021 11:22:32 -0700 Subject: [PATCH 6/8] test: remove packages iteratively --- .github/workflows/canary.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 17b09cbd..b2baa597 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -26,8 +26,9 @@ jobs: - name: test ${{matrix.package}} run: | npm install - npx rimraf "**/micromark" - npx rimraf "**/micromark-util-*" + for package in $(ls ../../packages); do + npx rimraf "node_modules/**/$package" + done npm test working-directory: canary/${{matrix.package}} From b9d3b4e723992338b8757a79fbcc25b06563e175 Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 24 Dec 2021 11:24:34 -0700 Subject: [PATCH 7/8] test: move canary job into main workflow --- .github/workflows/canary.yml | 49 ------------------------------------ .github/workflows/main.yml | 46 ++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/canary.yml diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml deleted file mode 100644 index b2baa597..00000000 --- a/.github/workflows/canary.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: canary -on: - - pull_request - - push -jobs: - canary: - name: testing ${{matrix.package}} - runs-on: ${{matrix.os}} - steps: - - name: checkout micromark - uses: actions/checkout@v2 - - name: setup node - uses: dcodeIO/setup-node-nvm@master - with: - node-version: ${{matrix.node}} - - name: setup micromark - run: | - npm install -g npm - npm install - npm run build - - name: checkout ${{matrix.package}} - uses: actions/checkout@v2 - with: - repository: ${{matrix.package}} - path: canary/${{matrix.package}} - - name: test ${{matrix.package}} - run: | - npm install - for package in $(ls ../../packages); do - npx rimraf "node_modules/**/$package" - done - npm test - working-directory: canary/${{matrix.package}} - - strategy: - fail-fast: false - max-parallel: 2 - matrix: - os: - - ubuntu-latest - node: - - node - package: - - micromark/micromark-extension-gfm - - micromark/micromark-extension-directive - - micromark/micromark-extension-mdx - - syntax-tree/mdast-util-from-markdown - - remarkjs/remark - - remarkjs/react-markdown diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66ff694c..89b31343 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ on: - pull_request - push jobs: - main: + test: name: '${{matrix.node}} on ${{matrix.os}}' runs-on: ${{matrix.os}} steps: @@ -23,3 +23,47 @@ jobs: node: - lts/erbium - node + canary: + name: testing ${{matrix.package}} + runs-on: ${{matrix.os}} + steps: + - name: checkout micromark + uses: actions/checkout@v2 + - name: setup node + uses: dcodeIO/setup-node-nvm@master + with: + node-version: ${{matrix.node}} + - name: setup micromark + run: | + npm install -g npm + npm install + npm run build + - name: checkout ${{matrix.package}} + uses: actions/checkout@v2 + with: + repository: ${{matrix.package}} + path: canary/${{matrix.package}} + - name: test ${{matrix.package}} + run: | + npm install + for package in $(ls ../../packages); do + npx rimraf "node_modules/**/$package" + done + npm test + working-directory: canary/${{matrix.package}} + + strategy: + fail-fast: false + max-parallel: 2 + matrix: + os: + - ubuntu-latest + node: + - node + package: + - micromark/micromark-extension-gfm + - micromark/micromark-extension-directive + - micromark/micromark-extension-mdx + - syntax-tree/mdast-util-from-markdown + - remarkjs/remark + - remarkjs/react-markdown From 702191fb80b7cb66dfe647f1bb91ec8360e92dbf Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Fri, 24 Dec 2021 11:28:23 -0700 Subject: [PATCH 8/8] test: clearer job naming --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 89b31343..291472c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: - push jobs: test: - name: '${{matrix.node}} on ${{matrix.os}}' + name: test / micromark / ${{matrix.node}} on ${{matrix.os}} runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v2 @@ -24,7 +24,7 @@ jobs: - lts/erbium - node canary: - name: testing ${{matrix.package}} + name: canary / ${{matrix.package}} / ${{matrix.node}} on ${{matrix.os}} runs-on: ${{matrix.os}} steps: - name: checkout micromark @@ -51,7 +51,6 @@ jobs: done npm test working-directory: canary/${{matrix.package}} - strategy: fail-fast: false max-parallel: 2