From bfb1655b955a84ea5305375f56a6cb1b004666c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Gu=C3=A9rout?= Date: Sat, 9 Dec 2023 12:17:27 +0100 Subject: [PATCH] with retro --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++---------- .tools/build.sh | 11 +++++++++-- tsconfig.test.json | 1 + 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d674b3c..7f0f379 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,31 +3,50 @@ on: [ push ] jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x, 17.x, 18.x ] steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 18.x + cache: npm - run: npm ci - run: npm test - run: npm run lint - run: npm run build + - uses: actions/upload-artifact@v3 + with: + name: built-tests + path: dist/test/ + + matrix: + runs-on: ubuntu-latest + needs: test + strategy: + matrix: + node-version: [ 10.x, 12.x, 14.x, 15.x ] + steps: + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - uses: actions/download-artifact@v3 + with: + name: built-tests + path: built-tests + - run: npm --prefix built-tests install + - run: npm --prefix built-tests test coverage: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18.x - run: npm ci - run: npm run coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} directory: .coverage diff --git a/.tools/build.sh b/.tools/build.sh index dc5eeee..f87eb85 100644 --- a/.tools/build.sh +++ b/.tools/build.sh @@ -9,7 +9,7 @@ cd "${PROJECT_DIR}" echo "Building oleoduc (esm version)..." tsc -p tsconfig.json -cat >"./dist/mjs/package.json" <"${PROJECT_DIR}/dist/mjs/package.json" <"./dist/mjs/package.json" <"./dist/cjs/package.json" <"${PROJECT_DIR}/dist/cjs/package.json" <