Dependabot Automerge #892
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dependabot Automerge | |
on: | |
workflow_run: | |
types: | |
- completed | |
workflows: | |
- 'Build & Test' | |
branches: | |
- 'dependabot/**' | |
jobs: | |
Test_docs-site: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v4 | |
- name: Set up environment | |
uses: ./.github/actions/prepare-environment | |
- name: Build site | |
env: | |
NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID }} | |
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }} | |
run: | | |
pnpm run build | |
- name: Jest | |
env: | |
JEST_JUNIT_OUTPUT_DIR: test-results/jest | |
JEST_JUNIT_OUTPUT_NAME: docs-site-results.xml | |
run: | | |
pnpm run test --ci --coverage --silent --no-cache --reporters=default --reporters=jest-junit --runInBand --testResultsProcessor=jest-sonar-reporter | |
- name: SonarCloud Scan | |
uses: defencedigital/design-system-sonarcloud-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
Test-e2e_docs-site: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
env: | |
NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID }} | |
NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }} | |
steps: | |
- name: Git clone repository | |
uses: actions/checkout@v4 | |
- name: Run e2e tests | |
uses: cypress-io/github-action@v6 | |
with: | |
build: pnpm run build | |
start: pnpm start | |
- name: Save images for failed tests | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cypress_screenshots | |
path: cypress/screenshots/ | |
Automerge: | |
name: Merge Dependabot PR's | |
runs-on: ubuntu-latest | |
needs: [Test_docs-site, Test-e2e_docs-site] | |
steps: | |
- name: Auto merge Dependabot minor and patch version bumps | |
uses: Royal-Navy/design-system-mergeme-action@master | |
with: | |
GITHUB_TOKEN: ${{ secrets.MERGE_BOT }} | |
PRESET: DEPENDABOT_MINOR |