diff --git a/.github/workflows/test-pr-legacy.yml b/.github/workflows/test-pr-legacy.yml new file mode 100644 index 00000000..7dc7647e --- /dev/null +++ b/.github/workflows/test-pr-legacy.yml @@ -0,0 +1,44 @@ +name: Test Pull Requests To Master (Node pre-17) + +on: + push: + branches: + - greenkeeper/* + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x, 16.x] # NOTE: When removing 14.x, we should be able to remove the 'upgrade npm' step!!! + os: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: upgrade npm + run: npm install -g npm + - name: npm versions + run: | + node --version + npm --version + - name: ci install + run: npm ci + - name: build + run: npm run build --if-present + - name: module test + run: npm run test:module + - name: run all code tests + run: npm test + - name: test package import + run: | + npm install ts-node @std/esm + npm run test:import + - name: test package require + run: | + npm run test:require diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 8c93b513..12b5b34b 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -1,4 +1,4 @@ -name: Test Pull Requests To Master +name: Test Pull Requests To Master (Node 17.0+) on: push: @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x] # NOTE: When removing 14.x, we should be able to remove the 'upgrade npm' step!!! + node-version: [18.x, 19.x] os: [ubuntu-latest, windows-latest, macOS-latest] steps: - uses: actions/checkout@v1 @@ -21,8 +21,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - name: upgrade npm - run: npm install -g npm - name: npm versions run: | node --version @@ -31,15 +29,17 @@ jobs: run: npm ci - name: build run: npm run build --if-present - NODE_OPTIONS: --openssl-legacy-provider + env: + CI: true + NODE_OPTIONS: --openssl-legacy-provider # necessary for webpack v4 in node 17+ - name: module test run: npm run test:module - name: run all code tests run: npm test - # - name: test package import - # run: | - # npm install ts-node @std/esm - # npm run test:import - # - name: test package require - # run: | - # npm run test:require + - name: test package import + run: | + npm install ts-node @std/esm + npm run test:import + - name: test package require + run: | + npm run test:require