From 5d0dd058c288007558625ca7f4375a9d363963b9 Mon Sep 17 00:00:00 2001 From: Unmesh Gundecha Date: Sun, 21 Feb 2021 17:50:23 +0800 Subject: [PATCH 1/4] Quick improvements to test --- .github/workflows/workflow.yml | 8 +++--- test/main.spec.js | 48 ++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 96afff8..eafacee 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -9,14 +9,16 @@ jobs: steps: - uses: actions/checkout@v1 + - name: markdown lit uses: nosborn/github-action-markdown-cli@v1.1.1 with: files: README.md config_file: ".markdownlint.json" - - name: tests + + - name: Checklist uses: actions/setup-node@v1 with: node-version: '12.x' - - run: npm ci - - run: npm test \ No newline at end of file + run: npm ci && npm test + \ No newline at end of file diff --git a/test/main.spec.js b/test/main.spec.js index 692593d..c09fe02 100644 --- a/test/main.spec.js +++ b/test/main.spec.js @@ -8,32 +8,34 @@ var expect = chai.expect; const srcMd = fs.readFileSync('README.md', 'utf8'); -describe('Header', function () { - it('is intact', function () { - expect(srcMd).to.startsWith('# How they SRE'); +describe('Checklist', function () { + describe('Header', function () { + it('is intact', function () { + expect(srcMd).to.startsWith('# How they SRE'); + }); }); -}); -describe('Section Headers', function () { - it('intact', function () { - var expectedH2List = [ - '## Introduction', - '## Organizations', - '## SRECon Mix Playlist', - '## Resources', - '## Credits', - '## Other How They... repos', - '## Contribute', - '## License' - ] - var actualList = srcMd.match(/^## (.*$)/gim); - expect(expectedH2List).to.equalTo(actualList) + describe('Section Headers', function () { + it('intact', function () { + var expectedH2List = [ + '## Introduction', + '## Organizations', + '## SRECon Mix Playlist', + '## Resources', + '## Credits', + '## Other How They... repos', + '## Contribute', + '## License' + ] + var actualList = srcMd.match(/^## (.*$)/gim); + expect(actualList).to.equalTo(expectedH2List) + }); }); -}); -describe('Organization list', function () { - it('is sorted', function () { - var orgList = srcMd.match(/(?<=)(.*?)(?=<\/summary>)/g); - expect(orgList).to.be.sorted(Intl.Collator().compare); + describe('Organization list', function () { + it('is sorted', function () { + var orgList = srcMd.match(/(?<=)(.*?)(?=<\/summary>)/g); + expect(orgList).to.be.sorted(Intl.Collator().compare); + }); }); }); \ No newline at end of file From 97d7b203c4c50bed69053293f730c4933bb65c8b Mon Sep 17 00:00:00 2001 From: Unmesh Gundecha Date: Sun, 21 Feb 2021 17:52:02 +0800 Subject: [PATCH 2/4] Fix --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index eafacee..d574148 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,5 +20,5 @@ jobs: uses: actions/setup-node@v1 with: node-version: '12.x' - run: npm ci && npm test + - run: npm ci && npm test \ No newline at end of file From c68d303aea147c395f0ec08b4bc9458ecd31846d Mon Sep 17 00:00:00 2001 From: Unmesh Gundecha Date: Sun, 21 Feb 2021 17:54:08 +0800 Subject: [PATCH 3/4] Fix workflow --- .github/workflows/workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d574148..0ec28f1 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -10,13 +10,13 @@ jobs: steps: - uses: actions/checkout@v1 - - name: markdown lit + - name: Run markdown lint uses: nosborn/github-action-markdown-cli@v1.1.1 with: files: README.md config_file: ".markdownlint.json" - - name: Checklist + - name: Setup and run check list uses: actions/setup-node@v1 with: node-version: '12.x' From 0caed6e38efd5958f37987d886fe8947cfa7d185 Mon Sep 17 00:00:00 2001 From: Unmesh Gundecha Date: Sun, 21 Feb 2021 18:00:34 +0800 Subject: [PATCH 4/4] Fix workflow --- .github/workflows/workflow.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 0ec28f1..3f7447d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -16,9 +16,11 @@ jobs: files: README.md config_file: ".markdownlint.json" - - name: Setup and run check list + - name: Node setup uses: actions/setup-node@v1 with: node-version: '12.x' - - run: npm ci && npm test + + - name: Run Checklist + run: npm ci && npm test \ No newline at end of file