diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..dd364cb9 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,77 @@ +name: build + +on: + push: + pull_request: + workflow_dispatch: + + +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +jobs: + test-old: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} + + strategy: + fail-fast: false + matrix: + node: + - 18.x + - 16.x + - 14.x + - 12.x + - 10.x + - 8.x + + steps: + - name: Checkout + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + with: + show-progress: false + + - name: install pnpm + run: curl -fsSL https://get.pnpm.io/install.sh | sh - + + - name: Setup node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Install project + run: pnpm install --frozen-lockfile + + - name: test + run: pnpm test + + + test: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }} + + steps: + - name: Checkout + uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 + with: + show-progress: false + + - name: enable corepack + run: corepack enable + + - name: Setup node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version-file: .node-version + cache: pnpm + + - name: enable corepack + run: corepack enable + + - name: Install project + run: pnpm install --frozen-lockfile + + - name: test + run: pnpm test \ No newline at end of file diff --git a/.node-version b/.node-version new file mode 100644 index 00000000..87834047 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.12.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dbd92681..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "10" - - "11" - - "8" -notifications: - slack: - rooms: - secure: W5hUm0MPWJ3v2VGRAq9fxgroVvqFOkwnbrxllEX3Zadf3e909fwQzm7KEUvSEd9fhsKrdBxPrphCZd1UCq5cXjCkfokKFojnbgnYPKZYgL4M7GWqiURCfIUY7r0gQCDnFzIIANacIbhT8089IkQva8QWCdfX4zVycTKOvMC0msE= -branches: - only: - - master