mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
fmt fixes
This commit is contained in:
parent
479aec13c5
commit
8cbc468ac8
2 changed files with 16 additions and 14 deletions
22
.github/workflows/ci.yaml
vendored
22
.github/workflows/ci.yaml
vendored
|
|
@ -9,26 +9,34 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
test_node:
|
test_lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ !github.event.created }}
|
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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: [ '14', '13', '12', '11', '10', '8' ]
|
node: [ '14', '13', '12', '11', '10', '8' ]
|
||||||
name: Test with Node v${{ matrix.node }}
|
name: Test with Node v${{ matrix.node }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint:check
|
|
||||||
- run: npm run format:check
|
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run test
|
- run: npm run test
|
||||||
|
|
||||||
|
|
||||||
trigger_publish:
|
trigger_publish:
|
||||||
name: Trigger publish.yaml workflow if package.json version updated ( and secrets.PAT is set ).
|
name: Trigger publish.yaml workflow if package.json version updated ( and secrets.PAT is set ).
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -37,7 +45,6 @@ jobs:
|
||||||
if: github.event_name == 'push' && github.event.head_commit.author.name != 'ts_ci'
|
if: github.event_name == 'push' && github.event.head_commit.author.name != 'ts_ci'
|
||||||
needs: test_node
|
needs: test_node
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Get version on branch 'latest'
|
- name: Get version on branch 'latest'
|
||||||
id: v_latest
|
id: v_latest
|
||||||
uses: garronej/github_actions_toolkit@v1.4
|
uses: garronej/github_actions_toolkit@v1.4
|
||||||
|
|
@ -47,8 +54,6 @@ jobs:
|
||||||
repo: ${{github.event.repository.name}}
|
repo: ${{github.event.repository.name}}
|
||||||
branch: latest
|
branch: latest
|
||||||
compare_to_version: '0.0.0'
|
compare_to_version: '0.0.0'
|
||||||
|
|
||||||
|
|
||||||
- name: Get version on master
|
- name: Get version on master
|
||||||
id: v_master
|
id: v_master
|
||||||
uses: garronej/github_actions_toolkit@v1.4
|
uses: garronej/github_actions_toolkit@v1.4
|
||||||
|
|
@ -58,7 +63,6 @@ jobs:
|
||||||
repo: ${{github.event.repository.name}}
|
repo: ${{github.event.repository.name}}
|
||||||
branch: ${{ github.sha }}
|
branch: ${{ github.sha }}
|
||||||
compare_to_version: ${{steps.v_latest.outputs.version || '0.0.0'}}
|
compare_to_version: ${{steps.v_latest.outputs.version || '0.0.0'}}
|
||||||
|
|
||||||
- name: 'Trigger the ''publish'' workflow if newer version'
|
- name: 'Trigger the ''publish'' workflow if newer version'
|
||||||
if: ${{ !!env.PAT && steps.v_master.outputs.compare_result == '1' }}
|
if: ${{ !!env.PAT && steps.v_master.outputs.compare_result == '1' }}
|
||||||
uses: garronej/github_actions_toolkit@v1.4
|
uses: garronej/github_actions_toolkit@v1.4
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ Delete these files:
|
||||||
- ``.prettierignore``
|
- ``.prettierignore``
|
||||||
- ``.prettierrc.json``
|
- ``.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
|
### Disable Eslint and Prettier altogether
|
||||||
|
|
||||||
|
|
@ -186,7 +186,7 @@ Remove these ``package.j`on``'s ``devDependencies``:
|
||||||
- ``@typescript-eslint/eslint-plugin``
|
- ``@typescript-eslint/eslint-plugin``
|
||||||
- ``husky``
|
- ``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:
|
Delete these files:
|
||||||
- ``.prettierignore``
|
- ``.prettierignore``
|
||||||
|
|
@ -194,9 +194,7 @@ Delete these files:
|
||||||
- ``.eslintignore``
|
- ``.eslintignore``
|
||||||
- ``.eslintrc.js``
|
- ``.eslintrc.js``
|
||||||
|
|
||||||
Remove these lines from ``.github/workflows/ci.yaml``:
|
In ``.github/workflows/ci.yaml`` remove the ``test_lint`` job and the line ``needs: test_lint``.
|
||||||
- ``- run: npm run lint:check``
|
|
||||||
- ``- run: npm run format:check``
|
|
||||||
|
|
||||||
## Disable CDN build
|
## Disable CDN build
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue