From bf4310c5b4d2c9ecfedf9f18ffdf80add957945d Mon Sep 17 00:00:00 2001 From: Ayush kumar <67006255+Ayush7614@users.noreply.github.com> Date: Fri, 15 Oct 2021 12:45:11 +0530 Subject: [PATCH] CI: Add Github Actions workflows for install, build and analysis --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++ .github/workflows/codeql-analysis.yml | 36 ++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cc7382c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Build and Test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + + node-version: + - 14.x + - 16.x + + steps: + - name: Checkout + uses: actions/checkout@master + + + - name: Install dependencies + run: | + npm + pushed client + npm + popd + - name: Build the project + run: npm run start \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..d70eab0 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,36 @@ +name: "CodeQL analysis" + +on: + push: + branches: [master] + pull_request: + branches: [master] + schedule: + - cron: '0 16 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: ['javascript'] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 \ No newline at end of file