diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml new file mode 100644 index 0000000000..2acdccccb1 --- /dev/null +++ b/.github/workflows/node.js-tests.yml @@ -0,0 +1,65 @@ +name: Node.js CI + +push: + branches: + - master + - production-** + pull_request: + branches: + - master + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - name: Checkout Source Files + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Lint Source Files + run: | + npm ci + npm run ensure-env --if-present + npm run lint --if-present + + build: + name: Check Builds and Run Integration Tests + needs: lint + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x] + + steps: + - name: Checkout Source Files + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Set Environment variables + run: cp sample.env .env + + - name: Install Dependencies + run: | + npm ci + npm run ensure-env --if-present + + - name: Build Packages + run: npm run build --if-present + + - name: Run Tests + run: npm test