diff --git a/.dependabot/config.yml b/.dependabot/config.yml new file mode 100644 index 00000000..ffdf40ee --- /dev/null +++ b/.dependabot/config.yml @@ -0,0 +1,12 @@ +version: 1 +update_configs: + - package_manager: "javascript" + directory: "/" + update_schedule: "daily" + automerged_updates: + - match: + dependency_type: "development" + update_type: "all" + - match: + dependency_type: "production" + update_type: "semver:patch" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..fa302c2a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + name: node-${{ matrix.node }} + strategy: + matrix: + node: [14] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: yarn --frozen-lockfile + - run: yarn build + env: + VERCEL_GIT_COMMIT_SHA: ${{ github.sha }} + NEXT_PUBLIC_GA_TRACKING_ID: "N/A" diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..fcc22621 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,54 @@ +name: Integration tests + +on: [deployment_status] + +jobs: + build: + if: github.event.deployment_status.state == 'success' + name: node-${{ matrix.node }} ${{ matrix.browser }} ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node: [14] + browser: ["chrome", "firefox"] + steps: + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - uses: actions/checkout@v1 + - name: Testing ${{ github.event.deployment_status.target_url }} + uses: DevExpress/testcafe-action@latest + with: + args: "${{ matrix.browser }}:headless tests" + env: + CI: true + TARGET_URL: ${{ github.event.deployment_status.target_url }} + - name: Integration tests passed + if: ${{ success() }} + + run: | + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{ + "context": "node-${{ matrix.node }} ${{ matrix.browser }} ${{ matrix.os }}", + "state": "success", + "description": "Integration tests passed", + "target_url": "'"$GITHUB_SERVER_URL"'/'"$GITHUB_REPOSITORY"'/actions/runs/'"$GITHUB_RUN_ID"'" + }' + + - name: Integration tests failed + if: ${{ failure() }} + run: | + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{ + "context": "node-${{ matrix.node }} ${{ matrix.browser }} ${{ matrix.os }}", + "state": "failure", + "description": "Integration tests failed", + "target_url": "'"$GITHUB_SERVER_URL"'/'"$GITHUB_REPOSITORY"'/actions/runs/'"$GITHUB_RUN_ID"'" + }'