Skip to content

Commit

Permalink
Fix CI (#724)
Browse files Browse the repository at this point in the history
* Upgrade the lockfile

* Update workflows

* Match pnpm versions with node versions

* Silly node version support

* Updates

* Updates

* Update
  • Loading branch information
NullVoxPopuli authored Sep 18, 2024
1 parent 5b7b04a commit 37a4727
Show file tree
Hide file tree
Showing 8 changed files with 3,373 additions and 2,705 deletions.
19 changes: 0 additions & 19 deletions .github/actions/pnpm/action.yml

This file was deleted.

78 changes: 39 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: ./.github/actions/pnpm
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3

#############################################################

Expand All @@ -30,30 +29,27 @@ jobs:
runs-on: ubuntu-latest
needs: ['install_dependencies']
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: ./.github/actions/pnpm
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm lint:js

lint_docs:
name: Lint Docs
runs-on: ubuntu-latest
needs: ['install_dependencies']
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: ./.github/actions/pnpm
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm lint:docs

lint_readme:
name: README up to date
runs-on: ubuntu-latest
needs: ['install_dependencies']
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: ./.github/actions/pnpm
- run: pnpm update && git diff --exit-code README.md docs/
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm run update && git diff --exit-code README.md docs/

#############################################################

Expand All @@ -65,33 +61,38 @@ jobs:
fail-fast: false
matrix:
node:
- "14"
- "16"
- "18"
# pnpm 9 does not support < Node 18
# pnpm 8 does not support < Node 16
- { node: "14", pnpm: "6" }
# pnpm 9 does not support < Node 18
# pnpm 8 does not support < Node 16
- { node: "16", pnpm: "7" }
# pnpm 9 only supports node >= 18
- { node: "18", pnpm: "9" }
eslint:
- "eslint@8"
- "eslint@7"
- "eslint@6"
steps:
- uses: volta-cli/action@v4
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
with:
node-version: ${{ matrix.node }}
- uses: ./.github/actions/pnpm
- name: "Use ${{ matrix.eslint }}"
run: |
pnpm remove eslint
pnpm add ${{ matrix.eslint }}
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: ${{ matrix.node.node }}
pnpm-version: ${{ matrix.node.pnpm }}
- name: "Use ${{ matrix.eslint }}"
run: |
pnpm remove eslint
pnpm add ${{ matrix.eslint }}
- name: Test with ${{ matrix.node }}
run: |
echo "Matrix Info"
echo "Intended: ${{ matrix.node }}, ${{ matrix.eslint }}"
echo "node: $(node -v)"
echo "pnpm why eslint"
pnpm why eslint
pnpm test
- name: Test with ${{ matrix.node.node }} & ${{ matrix.node.pnpm }}
run: |
echo "Matrix Info"
echo "Intended: node@${{ matrix.node.node }}, eslint@${{ matrix.eslint }}, pnpm@${{ matrix.node.pnpm }}"
echo "node: $(node -v)"
echo "pnpm: $(pnpm --version)"
echo "pnpm why eslint"
pnpm why eslint
pnpm test
smoke-tests:
name: ${{ matrix.script }}
Expand All @@ -115,9 +116,8 @@ jobs:


steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v4
- uses: ./.github/actions/pnpm
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: ./scripts/smoke-test.sh smoke-tests/${{ matrix.script }}

# https://github.com/changesets/action
Expand All @@ -130,10 +130,10 @@ jobs:
- tests

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ./.github/actions/pnpm
- uses: wyvox/action-setup-pnpm@v3
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand Down
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# we never want to use packages from the registry over what's in the workspace
prefer-workspaces-packages=true

# default is true, we do this to try to have more isolation
# since we test with incompatible sets of TS types.
shared-workspace-lockfile=false
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@
},
"volta": {
"node": "18.16.1",
"yarn": "1.22.19"
"pnpm": "9.10.0"
}
}
Loading

0 comments on commit 37a4727

Please sign in to comment.