From ec3aed996193ff24038e18a44b24981a5979927b Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Thu, 10 Feb 2022 10:31:26 +0530 Subject: [PATCH] Added configuration to verify build on PR and commit --- .github/workflows/pull-request.yml | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 00000000..459fd7b7 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,33 @@ +name: Verify build + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + + - name: Install Dependencies + run: npm install + - name: Generate .env file + run: cp .env.example .env + - name: Build + run: npm run build