Skip to content

Commit

Permalink
ci: optimize ci configuration
Browse files Browse the repository at this point in the history
Changes:
- install compatible version of eslint plugin for prettier
- remove lowest version of prettier
- allow latest version of prettier 3 to be installed
- enable experimental feature of esm for nodejs, required for prettier 3
  • Loading branch information
zackad committed Feb 21, 2024
1 parent e68e511 commit cae69c1
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,39 @@ on:
- master
pull_request:

env:
NODE_OPTIONS: --experimental-vm-modules

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node_version: [18, 20]
prettier_version: ["2.3.0", "^2.3.0", "3.0.0"]
node_version: [ 18, 20 ]
prettier_version: [ "^2.3.0", "^3.0.0" ]
eslint_plugin_prettier_version: [ "^4.0.0", "^5.0.0" ]
exclude:
- prettier_version: ^2.3.0
eslint_plugin_prettier_version: ^5.0.0
- prettier_version: ^3.0.0
eslint_plugin_prettier_version: ^4.0.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "yarn"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "yarn"
- name: Install Prettier
run: yarn add prettier@${{ matrix.prettier_version }}

- name: Install Dependencies
run: yarn add prettier@${{ matrix.prettier_version }}
- name: Install Eslint plugin for prettier
run: yarn add --dev eslint-plugin-prettier@${{ matrix.eslint_plugin_prettier_version }}

- name: Run Test
run: yarn test
- name: Run Test
run: yarn test

0 comments on commit cae69c1

Please sign in to comment.