Skip to content

Commit

Permalink
Merge pull request #95 from 2fd/chore/update-github-action-runner
Browse files Browse the repository at this point in the history
chore: unify build jobs
  • Loading branch information
2fd authored Dec 23, 2024
2 parents ee91f3c + 23a05f4 commit 1acf82b
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 180 deletions.
170 changes: 0 additions & 170 deletions .github/workflows/pull_request.yml

This file was deleted.

42 changes: 32 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: release

on:
pull_request:
branches:
- master
- 1.10.x
- 1.9.x
- 1.8.x
- 1.7.x
- 1.6.x
- 1.5.x
- 1.4.x
- 1.3.x
- 1.2.x
- 1.1.x
- 1.0.x

push:
branches:
- master
- 1.10.x
- 1.9.x
- 1.8.x
- 1.7.x
Expand All @@ -17,19 +33,19 @@ on:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- name: Run actions/setup-node@v4
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
registry-url: https://registry.npmjs.org/

- uses: actions/cache@v4
Expand Down Expand Up @@ -60,13 +76,13 @@ jobs:
path: lib/

test_node:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

needs: build

strategy:
matrix:
version: ["20", "21"]
version: ["20", "22", "23"]

steps:
- uses: actions/checkout@v4
Expand All @@ -88,7 +104,7 @@ jobs:
- run: node --test test/node.test.mjs

test_bun:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

needs: build

Expand All @@ -115,7 +131,7 @@ jobs:
- run: bun test test/bun.test.mjs

test_deno:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

needs: build

Expand All @@ -136,12 +152,15 @@ jobs:
name: lib
path: lib

- run: deno install
if: ${{ matrix.version != '1.x' }}

- run: deno run --allow-read=lib/rregex.wasm lib/esm.mjs

- run: deno test --allow-read=lib/rregex.wasm test/deno.test.mjs

test_cf:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

needs: build

Expand All @@ -155,7 +174,7 @@ jobs:
- name: Run actions/setup-node@v4
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
registry-url: https://registry.npmjs.org/

- uses: actions/download-artifact@v4
Expand All @@ -170,7 +189,10 @@ jobs:
working-directory: ./test/cf

publish:
runs-on: ubuntu-20.04

if: ${{ github.event_name != 'pull_request' }}

runs-on: ubuntu-24.04

permissions:
contents: write # to be able to publish a GitHub release
Expand Down
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"devDependencies": {
"@semantic-release/exec": "^6.0.3",
"@types/node": "^22.10.2",
"concurrently": "^8.2.2",
"semantic-release": "^23.0.6",
"tinybench": "^2.7.0",
Expand Down

0 comments on commit 1acf82b

Please sign in to comment.