Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = getESLintConfig({
rules: {
'no-use-before-define': 0,
'import/named': 0,
'import/no-unresolved': 0,
'@typescript-eslint/no-shadow': 0,
'@typescript-eslint/ban-ts-comment': 0 // We do need our ts-ignores
}
Expand Down
36 changes: 27 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
tags:
- v*

permissions:
contents: read

jobs:
check_branch:
runs-on: ubuntu-22.04
outputs:
should_build: ${{ steps.permitted.outputs.result }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Fetch remote branches
run: |
Expand All @@ -30,7 +33,7 @@ jobs:
echo "result=${result}" >> "$GITHUB_OUTPUT"

release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: check_branch
permissions:
contents: write
Expand All @@ -42,19 +45,34 @@ jobs:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version-file: '.nvmrc'

- name: Enable Corepack / Yarn 4
run: |
corepack enable
corepack prepare yarn@4.13.0 --activate
yarn -v

- name: Cache Yarn Berry artifacts
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
cache: 'yarn'
path: |
~/.yarn/berry/cache
.yarn/install-state.gz
key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }}

- name: Install dependencies
run: yarn
run: yarn install --immutable

- name: Build packages
run: npm run build
- name: Run tests from transpiled code
run: npx ocular-test dist

- name: Run release test suite
run: yarn test

- name: Login to NPM
run: npm config set "//registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}"
Expand Down
53 changes: 36 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,60 @@ on:
- master
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 15

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Setup Node (with Corepack)
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
cache: "yarn"
node-version-file: '.nvmrc'

- name: Install dependencies
- name: Enable Corepack / Yarn 4
run: |
yarn install
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
corepack enable
corepack prepare yarn@4.13.0 --activate
yarn -v

- name: Cache Yarn Berry artifacts
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.yarn/berry/cache
.yarn/install-state.gz
key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }}

- name: Install dependencies
run: yarn install --immutable

- name: Build code
run: |
yarn build
run: yarn build

- name: Run tests
run: |
yarn test ci

run: yarn test ci

- name: Run lint
run: |
yarn lint
run: yarn lint

- name: Build website
run: |
cd website
yarn install
yarn install --immutable
yarn build

- name: Coveralls
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # v1.2.5
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
43 changes: 31 additions & 12 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
branches:
- '*-release'

permissions:
contents: read

jobs:
check_branch:
runs-on: ubuntu-22.04
outputs:
should_deploy: ${{ endsWith(github.ref, steps.get_version.outputs.latest) }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Get version
id: get_version
Expand All @@ -23,7 +26,7 @@ jobs:
echo "latest=${LATEST}-release" >> "$GITHUB_OUTPUT"

deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: check_branch

permissions:
Expand All @@ -32,25 +35,41 @@ jobs:
if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_deploy }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
- uses: volta-cli/action@2d68418f32546fd191eb666e232b321d5726484d # v4.1.1

- name: Setup Node (with Corepack)
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version-file: '.nvmrc'

- name: Enable Corepack / Yarn 4
run: |
corepack enable
corepack prepare yarn@4.13.0 --activate
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does prepare do? That's a new one to me

yarn -v

- name: Cache Yarn Berry artifacts
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
cache: 'yarn'
path: |
~/.yarn/berry/cache
.yarn/install-state.gz
key: ${{ runner.os }}-yarn4-${{ hashFiles('yarn.lock', '.yarnrc.yml', 'package.json') }}

- name: Install dependencies
run: |
yarn
(cd website && yarn)
yarn install --immutable
(cd website && yarn install --immutable)

- name: Build website
run: (cd website && yarn build)

- name: Deploy
uses: JamesIves/github-pages-deploy-action@132898c54c57c7cc6b80eb3a89968de8fc283505 # 3.7.1
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # 4.8.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: website/build
CLEAN: true
token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
branch: gh-pages
folder: website/build
clean: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!.yarn/releases
!.yarn/sdks
!.yarn/versions
*/**/.yarn/*

*/**/yarn.lock
!website/yarn.lock
Expand Down Expand Up @@ -37,4 +38,3 @@ tsconfig.tsbuildinfo
.idea
*.zip
*.rar

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.22.1
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@probe.gl/bench": "^4.0.0",
"@turf/destination": "^6.0.1",
"@types/tape-promise": "^4.0.1",
"@vis.gl/dev-tools": "1.0.0-alpha.19",
"@vis.gl/ts-plugins": "1.0.0-alpha.19",
"@vis.gl/dev-tools": "^1.0.2",
"@vis.gl/ts-plugins": "^1.0.2",
"pre-commit": "^1.2.2",
"puppeteer": "^22.0.0",
"tap-spec": "^5.0.0"
Expand All @@ -44,8 +44,5 @@
"pre-commit": [
"test-pre-commit"
],
"volta": {
"node": "20.15.1",
"yarn": "4.6.0"
}
"packageManager": "yarn@4.13.0"
}
Binary file removed website/.yarn/install-state.gz
Binary file not shown.
6 changes: 1 addition & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,5 @@
"browserslist": [
">0.2% and supports async-functions",
"not dead"
],
"volta": {
"node": "20.15.1",
"yarn": "4.6.0"
}
]
}
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2049,9 +2049,9 @@ __metadata:
languageName: node
linkType: hard

"@vis.gl/dev-tools@npm:1.0.0-alpha.19":
version: 1.0.0-alpha.19
resolution: "@vis.gl/dev-tools@npm:1.0.0-alpha.19"
"@vis.gl/dev-tools@npm:^1.0.2":
version: 1.0.2
resolution: "@vis.gl/dev-tools@npm:1.0.2"
dependencies:
"@esbuild-plugins/node-globals-polyfill": "npm:^0.2.0"
"@esbuild-plugins/node-modules-polyfill": "npm:^0.2.0"
Expand Down Expand Up @@ -2092,19 +2092,19 @@ __metadata:
ocular-metrics: scripts/metrics.js
ocular-publish: scripts/publish.js
ocular-test: scripts/test.js
checksum: 10c0/7fc365a758603a5a87cf28e00d8aa7761301519fc09be1f62d344743525940b176ae3e3b997526639b5346ba4ee64f75bb2e7ac9bf7633420fa6b00859bbb271
checksum: 10c0/692d8d5c2d77932b2c8e0b500b09c266633090154a5bdb6cf990f40494ea8a3772b35b29530b8424e5d18faa4898f1769e0daebffab80aec4e5b8f2317d55b48
languageName: node
linkType: hard

"@vis.gl/ts-plugins@npm:1.0.0-alpha.19":
version: 1.0.0-alpha.19
resolution: "@vis.gl/ts-plugins@npm:1.0.0-alpha.19"
"@vis.gl/ts-plugins@npm:^1.0.2":
version: 1.0.2
resolution: "@vis.gl/ts-plugins@npm:1.0.2"
dependencies:
"@luma.gl/constants": "npm:^9.0.0"
minimatch: "npm:^3.0.0"
ts-patch: "npm:^3.1.2"
typescript: "npm:^5.2.2"
checksum: 10c0/967b8952c8a449da008db51a0b0cc8d0c50e9ac571d6c1379c4407d276e8bd34b634829ad001c7604412fe09c7d09bc88ae03dc4fe8a48bad4c81c19f61ba55b
checksum: 10c0/995a27df25124f10971edaf2cbd547664b90270357b4f59bfa23e32e2dd1f973a4cb3048a00bf7a108f38a78c107fb7af5c3e231aac647be07537ff6cf90eff7
languageName: node
linkType: hard

Expand Down Expand Up @@ -6907,8 +6907,8 @@ __metadata:
"@probe.gl/bench": "npm:^4.0.0"
"@turf/destination": "npm:^6.0.1"
"@types/tape-promise": "npm:^4.0.1"
"@vis.gl/dev-tools": "npm:1.0.0-alpha.19"
"@vis.gl/ts-plugins": "npm:1.0.0-alpha.19"
"@vis.gl/dev-tools": "npm:^1.0.2"
"@vis.gl/ts-plugins": "npm:^1.0.2"
pre-commit: "npm:^1.2.2"
puppeteer: "npm:^22.0.0"
tap-spec: "npm:^5.0.0"
Expand Down
Loading