diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml new file mode 100644 index 0000000..2c7a361 --- /dev/null +++ b/.github/workflows/api.yml @@ -0,0 +1,49 @@ +name: API + +on: + push: + paths: + - "api/**" + pull_request: + paths: + - "api/**" + +jobs: + api-build: + name: Build + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./api + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.16.x + + - name: cache node_modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Installling dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: go mod vendor + + - name: Build + run: go build ./ + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: go + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 \ No newline at end of file diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml new file mode 100644 index 0000000..a8f98e3 --- /dev/null +++ b/.github/workflows/client.yml @@ -0,0 +1,57 @@ +name: Client + +on: + push: + paths: + - "client/**" + pull_request: + paths: + - "client/**" + +jobs: + client-build: + name: Build + runs-on: ${{ matrix.os }} + + defaults: + run: + working-directory: ./client + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2.1.5 + with: + node-version: ${{ matrix.node }} + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: cache node_modules + uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Installling dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: yarn + + - name: Lint + run: yarn lint + + - name: Build + run: yarn build + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: javascript + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 \ No newline at end of file diff --git a/.github/workflows/environment.yml b/.github/workflows/environment.yml deleted file mode 100644 index fb3fed9..0000000 --- a/.github/workflows/environment.yml +++ /dev/null @@ -1 +0,0 @@ -# This is codeql with setup go and setup nodejs + lint + build \ No newline at end of file