From fa68083bd1757912c6a2ad312c9f2c849648f1a3 Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Mon, 4 Dec 2023 15:32:28 +0000 Subject: [PATCH] ci: run ci on pull requests --- .github/workflows/main.yml | 38 ++++---------------------------------- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0ceafe2..583a0c72 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,46 +2,16 @@ name: Main on: push jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - node: [10, 12, 14] - name: Test on Node.js ${{ matrix.node }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Node.js - uses: actions/setup-node@v2.1.4 - with: - node-version: ${{ matrix.node }} - - - name: Install - run: npm ci - - - name: Lint - run: npm run lint - - - name: Test - run: npm test - release: needs: test runs-on: ubuntu-latest name: Release steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Node.js - uses: actions/setup-node@v2.1.4 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 12 - - - name: Install - run: npm ci - + node-version: 16 + - run: npm ci - name: Run semantic-release uses: cycjimmy/semantic-release-action@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..fcd4d133 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node: + - 16 + - 14 + - 12 + name: Test on Node.js ${{ matrix.node }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - run: npm ci + - run: npm run lint + - run: npm run test