From 76b2acd341c3819548a19108fc2cde26bd7ce072 Mon Sep 17 00:00:00 2001 From: wellwelwel <46850407+wellwelwel@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:05:42 -0300 Subject: [PATCH] ci: add build test --- .github/workflows/ci_build.yml | 37 ++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 30 +-------------------------- 2 files changed, 38 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/ci_build.yml diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml new file mode 100644 index 0000000..79cfb10 --- /dev/null +++ b/.github/workflows/ci_build.yml @@ -0,0 +1,37 @@ +name: '๐Ÿง‘๐Ÿปโ€๐Ÿณ CI โ€” Build' + +on: + push: + branches: + - 'main' + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + name: Check + steps: + - name: โž• Actions - Checkout + uses: actions/checkout@v4 + + - name: โž• Actions - Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.x' + + - name: โž• Cache dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: npm-linux-${{ hashFiles('package-lock.json') }} + restore-keys: npm-linux- + + - name: ๐Ÿ“ฆ Installing Dependencies + run: npm ci + + - name: ๐Ÿคน๐Ÿปโ€โ™€๏ธ TypeScript Build + run: npm run build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c25790b..6f204c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,38 +47,10 @@ It's better to discuss an **API** before actually start implementing it. You can ## Testing -### General (recommended) - -#### Sequential and Parallel - -```sh -npm run test # Test with the locally installed Node.js version -npm run test:bun # Test with the locally installed Bun version -npm run test:deno # Test with the locally installed Deno version -``` - -#### Sequential - -```sh -npm run test:sequential # Test with the locally installed Node.js version -npm run test:bun:sequential # Test with the locally installed Bun version -npm run test:deno:sequential # Test with the locally installed Deno version -``` - -> Pass custom flags using `--`, for example: -> -> ```sh -> npm run test:sequential -- --debug --watch # etc. -> ``` -> -> - Same for **Bun** and **Deno**. - -#### Parallel - ```sh npm run test:node bun run test:bun -desno task test:deno +deno task test:deno ``` ---