From efb0275ffe0e07a779629d465a6f2342a7485001 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Fri, 14 Oct 2022 03:42:09 -0400 Subject: [PATCH 1/2] ci: run browser tests without circle (#3328) * ci: run browser tests without circle * Reduce scope * Bring back other tests * Apply to webworker tests * Changelog * Use specific node version * Review comments * Downgrade node in both places --- .github/workflows/unit-test.yml | 23 ++++++++--------------- CHANGELOG.md | 2 ++ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 8fc5e17ba2e..7dea0d9044f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -55,8 +55,6 @@ jobs: run: npm run codecov if: ${{ matrix.node_version == '14' }} node-windows-tests: - strategy: - fail-fast: false runs-on: windows-latest env: NPM_CONFIG_UNSAFE_PERM: true @@ -96,15 +94,15 @@ jobs: run: npm run test browser-tests: runs-on: ubuntu-latest - container: - image: circleci/node:16-browsers env: NPM_CONFIG_UNSAFE_PERM: true steps: - - name: Permission Setup - run: sudo chmod -R 777 /github /__w - name: Checkout - uses: actions/checkout@v3.0.2 + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 16 - name: restore lerna id: cache @@ -126,8 +124,6 @@ jobs: - name: Build 🔧 run: | - npm run compile - # run additional compilation variants npx lerna run compile - name: Unit tests @@ -136,15 +132,14 @@ jobs: run: npm run codecov:browser webworker-tests: runs-on: ubuntu-latest - container: - image: circleci/node:16-browsers env: NPM_CONFIG_UNSAFE_PERM: true steps: - - name: Permission Setup - run: sudo chmod -R 777 /github /__w - name: Checkout uses: actions/checkout@v3.0.2 + - uses: actions/setup-node@v3 + with: + node-version: 16 - name: restore lerna id: cache @@ -166,8 +161,6 @@ jobs: - name: Build 🔧 run: | - npm run compile - # run additional compilation variants npx lerna run compile - name: Unit tests diff --git a/CHANGELOG.md b/CHANGELOG.md index dc96d881501..5af8762b415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file. ### :house: (Internal) +* ci: run browser tests without circle [#3328](https://github.com/open-telemetry/opentelemetry-js/pull/3328) @dyladan + ## 1.7.0 ### :bug: (Bug Fix) From 07a16b7c90016ca171525228ba4ddf0a7823d297 Mon Sep 17 00:00:00 2001 From: Daniel Dyla Date: Fri, 14 Oct 2022 09:43:33 -0400 Subject: [PATCH 2/2] Test API with old node versions (#3296) Co-authored-by: Chengzhong Wu --- .github/workflows/unit-test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 7dea0d9044f..734bd6b29d3 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -167,3 +167,31 @@ jobs: run: npm run test:webworker - name: Report Coverage run: npm run codecov:webworker + api-eol-node-test: + strategy: + fail-fast: false + matrix: + node_version: + - "8" + - "10" + - "12" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node_version }} + + - name: Build + working-directory: ./api + run: | + npm install --ignore-scripts + npm install @types/mocha@^7 mocha@^7 ts-loader@^8 ts-mocha@^8 + node ../scripts/version-update.js + tsc --build tsconfig.json tsconfig.esm.json + + - name: Test + working-directory: ./api + run: npm test