From 8cbc468ac84d6760d139d31d7a6091b75349d749 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Wed, 27 May 2020 22:20:34 +0200 Subject: [PATCH] fmt fixes --- .github/workflows/ci.yaml | 22 +++++++++++++--------- README.md | 8 +++----- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 126cf52..6c25d64 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,26 +9,34 @@ on: jobs: - test_node: + test_lint: runs-on: ubuntu-latest if: ${{ !github.event.created }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm ci + - name: Making sure 'npm run lint' and 'npm run format' does not changes anything. + run: | + npm run lint:check + npm run format:check + + test_node: + runs-on: ubuntu-latest + needs: test_lint strategy: matrix: node: [ '14', '13', '12', '11', '10', '8' ] name: Test with Node v${{ matrix.node }} steps: - - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - run: npm ci - - run: npm run lint:check - - run: npm run format:check - run: npm run build - run: npm run test - trigger_publish: name: Trigger publish.yaml workflow if package.json version updated ( and secrets.PAT is set ). runs-on: ubuntu-latest @@ -37,7 +45,6 @@ jobs: if: github.event_name == 'push' && github.event.head_commit.author.name != 'ts_ci' needs: test_node steps: - - name: Get version on branch 'latest' id: v_latest uses: garronej/github_actions_toolkit@v1.4 @@ -47,8 +54,6 @@ jobs: repo: ${{github.event.repository.name}} branch: latest compare_to_version: '0.0.0' - - - name: Get version on master id: v_master uses: garronej/github_actions_toolkit@v1.4 @@ -58,7 +63,6 @@ jobs: repo: ${{github.event.repository.name}} branch: ${{ github.sha }} compare_to_version: ${{steps.v_latest.outputs.version || '0.0.0'}} - - name: 'Trigger the ''publish'' workflow if newer version' if: ${{ !!env.PAT && steps.v_master.outputs.compare_result == '1' }} uses: garronej/github_actions_toolkit@v1.4 diff --git a/README.md b/README.md index ae85f6f..82db438 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ Delete these files: - ``.prettierignore`` - ``.prettierrc.json`` -In ``.github/workflows/ci.yaml`` remove the line ``- run: npm run format:check``. +In ``.github/workflows/ci.yaml`` remove the line ``npm run format:check`` from the ``test_lint`` job. ### Disable Eslint and Prettier altogether @@ -186,7 +186,7 @@ Remove these ``package.j`on``'s ``devDependencies``: - ``@typescript-eslint/eslint-plugin`` - ``husky`` -Remove the ``lint-staged`` and ``husky`` fields from the ``package.json``. +Remove the ``lint-staged`` and ``husky`` fields from the ``package.json``. Delete these files: - ``.prettierignore`` @@ -194,9 +194,7 @@ Delete these files: - ``.eslintignore`` - ``.eslintrc.js`` -Remove these lines from ``.github/workflows/ci.yaml``: -- ``- run: npm run lint:check`` -- ``- run: npm run format:check`` +In ``.github/workflows/ci.yaml`` remove the ``test_lint`` job and the line ``needs: test_lint``. ## Disable CDN build