diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index cbd4531..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,46 +0,0 @@ -version: 2.1 - -jobs: - # This job is built separately because node <= 16 doesn't require - # (and will crash) if we use NODE_OPTIONS=--openssl-legacy-provider - # which is required for tests in more recent versions to work - test-node-16: - docker: - - image: cimg/node:16.20 - steps: - - checkout - - run: | - echo "Node version: $(node --version)" - echo "NPM version: $(npm --version)" - npm install - npm run ci - test: - parameters: - node-version: - type: string - docker: - - image: cimg/node:<< parameters.node-version >> - environment: - # Must be used for running the webpack@4 tests on node >= 17 - NODE_OPTIONS: --openssl-legacy-provider - steps: - - checkout - - run: | - echo "Node version: $(node --version)" - echo "NPM version: $(npm --version)" - npm install - npm run ci - -workflows: - all-tests: - jobs: - - test: - matrix: - parameters: - node-version: - - "current" - - "lts" - name: test-on-node-<< matrix.node-version >> - - test-node-16: - # Oldest maintenance LTS, End-of-Life 2023-09-11 - name: test-on-node-16.20 diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml new file mode 100644 index 0000000..c8c7a63 --- /dev/null +++ b/.github/workflows/config.yml @@ -0,0 +1,56 @@ +name: main + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + # Oldest maintenance LTS, End-of-Life 2025-04-30 + test-node-18: + runs-on: ubuntu-latest + container: + image: node:18.19 + env: + NODE_OPTIONS: --openssl-legacy-provider + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node.js + run: | + echo "Node version: $(node --version)" + echo "NPM version: $(npm --version)" + npm install + npm run ci + - name: Unset NODE_OPTIONS + run: | + unset NODE_OPTIONS + + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - "current" + - "20.10" + env: + NODE_OPTIONS: --openssl-legacy-provider + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Print Node.js version + run: | + echo "Node version: $(node --version)" + echo "NPM version: $(npm --version)" + - name: Install dependencies and run tests + run: | + npm install + npm run ci + - name: Unset NODE_OPTIONS + run: | + unset NODE_OPTIONS \ No newline at end of file