From d62b6101f3ba550dcccdcb86d74688201c012006 Mon Sep 17 00:00:00 2001 From: Inside4ndroid <65467186+Inside4ndroid@users.noreply.github.com> Date: Sat, 12 Apr 2025 16:17:09 +0100 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8218882 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [16.x, 18.x] + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - name: Run Tests + run: npm run test:ci + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: jest-test-results-${{ matrix.node-version }} + path: test-results/junit.xml