diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/dependabot.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/create_sentry_release.yml | 23 | ||||
| -rw-r--r-- | .github/workflows/test_and_lint.yml | 16 |
3 files changed, 35 insertions, 15 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..c5b6b65 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/create_sentry_release.yml b/.github/workflows/create_sentry_release.yml index 4ae20bb..4c522e9 100644 --- a/.github/workflows/create_sentry_release.yml +++ b/.github/workflows/create_sentry_release.yml @@ -13,16 +13,23 @@ jobs: steps: - uses: actions/checkout@v2 - uses: EgorDm/gha-yarn-node-cache@v1 - + - name: Install dependencies - run: yarn install - + run: yarn install --prod + + - name: Set SHA + id: commit-sha + run: | + if ${{ github.ref == 'refs/heads/main' }}; + then echo "::set-output name=sha::${{ github.sha }}"; + else echo "::set-output name=sha::${{ github.event.pull_request.head.sha }}"; + fi; + - name: Build application run: yarn build env: REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - REACT_APP_SHA: ${{ github.sha }} - REACT_APP_BRANCH: main + COMMIT_REF: ${{ steps.commit-sha.outputs.sha }} REACT_APP_OAUTH2_CLIENT_ID: ${{ secrets.CLIENT_ID }} - name: Create Sentry release (production) @@ -34,7 +41,8 @@ jobs: SENTRY_PROJECT: forms-frontend with: environment: production - sourcemaps: ./build/static/js/ + sourcemaps: ./build/ + version: ${{ steps.commit-sha.outputs.sha }} version_prefix: forms-frontend@ - name: Create Sentry release (deploy preview) @@ -46,5 +54,6 @@ jobs: SENTRY_PROJECT: forms-frontend with: environment: deploy-preview - sourcemaps: ./build/static/js/ + sourcemaps: ./build/ + version: ${{ steps.commit-sha.outputs.sha }} version_prefix: forms-frontend@ diff --git a/.github/workflows/test_and_lint.yml b/.github/workflows/test_and_lint.yml index 636e181..4767b3e 100644 --- a/.github/workflows/test_and_lint.yml +++ b/.github/workflows/test_and_lint.yml @@ -13,11 +13,11 @@ jobs: steps: - uses: actions/checkout@v2 - uses: EgorDm/gha-yarn-node-cache@v1 - - - name: Install dependencies - run: yarn install - + - name: Install dependencies + run: yarn install --prod + + - name: Build run: yarn build test: @@ -26,9 +26,9 @@ jobs: steps: - uses: actions/checkout@v2 - uses: EgorDm/gha-yarn-node-cache@v1 - + - name: Install dependencies - run: yarn install --dev + run: yarn install - name: Run tests run: yarn test @@ -41,7 +41,7 @@ jobs: - uses: EgorDm/gha-yarn-node-cache@v1 - name: Install dependencies - run: yarn install --dev + run: yarn install - name: Lint - run: yarn run eslint --ext .ts,.tsx --quiet src/ + run: yarn run eslint --ext .ts,.tsx --format ./annotations_formatter.js src/ |