From b1e8ecb4bee7a27ac20a7703d74139efcf2627bb Mon Sep 17 00:00:00 2001 From: Splines Date: Fri, 1 Dec 2023 15:20:22 +0100 Subject: [PATCH] Run tests in CI/CD pipeline --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..75acf53 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Tests + +on: + push: + branches: [main] + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + mocha: + name: Mocha + strategy: + matrix: + os: [ubuntu-latest] + eslint: [6, 7, 8] + node: [16, 17, 18, 19, 20, 21] + include: + - os: windows-latest + eslint: 7 + node: 16 + - os: macOS-latest + eslint: 7 + node: 16 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Node.js ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - name: Install dependencies + run: npm install + env: + CI: true + - name: Run Mocha tests + run: npm test