Skip to content

Commit

Permalink
chore: remove qa checks on push to master in the release workflow (#3306
Browse files Browse the repository at this point in the history
)

We have decided as a team to remove the quality checks from the release workflow.
We determined that these checks were superfluous given the following prerequisites:

* the quality checks must pass on the PR prior to merging
* the PR is required to have the latest code from master
* branch protection rules for the release branch (master) require that all pushes to
master are via merging a PR (and direct push by dhis2 bot)
* Only Jennifer and Jan and the dhis2 bot have push access to the release branch
  • Loading branch information
jenniferarnesen authored Aug 15, 2024
1 parent 5bbf3f8 commit bed6bf3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 85 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/publish-d2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Print GitHub event context
run: echo "$GITHUB_EVENT" | jq '.'
env:
GITHUB_EVENT: ${{ toJson(github.event) }}

- name: Print GitHub ref
run: echo "GITHUB_REF is $GITHUB_REF"

- name: Print GitHub actor
run: echo "GITHUB_ACTOR is $GITHUB_ACTOR"

- uses: actions/checkout@v3

- uses: actions/setup-node@v3
Expand Down
85 changes: 0 additions & 85 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,93 +15,8 @@ env:
CI: true

jobs:
setup-matrix:
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.specs }}
steps:
- uses: actions/checkout@v3
- name: Generate Test matrix
id: set-matrix
run: echo "::set-output name=specs::$(node cypress/support/generateTestMatrix.js)"

build:
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install
run: yarn install --frozen-lockfile

- name: Build
run: yarn d2-app-scripts build

lint:
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install
run: yarn install --frozen-lockfile

- name: Generate translations
run: yarn d2-app-scripts i18n generate

- name: Lint
run: yarn d2-style check

test:
if: ${{ !contains(github.event.head_commit.message, '[skip release]') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install
run: yarn install --frozen-lockfile

- name: Generate translations
run: yarn d2-app-scripts i18n generate

- name: Test
run: yarn d2-app-scripts test
env:
REPORTPORTAL_API_KEY: ${{ secrets.REPORTPORTAL_API_KEY }}
REPORTPORTAL_ENDPOINT: ${{ vars.REPORTPORTAL_ENDPOINT }}
REPORTPORTAL_PROJECT: ${{ vars.REPORTPORTAL_PROJECT }}
CI_BUILD_ID: ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
PR_TITLE: ${{ format('Direct push to {0}', github.ref_name) }}

call-workflow-e2e-prod:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip release]')}}
needs: [build, lint, test, setup-matrix]
uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-prod.yml@master
with:
should_record: ${{ contains(github.event.head_commit.message, '[e2e record]') }}
spec-group: ${{ needs.setup-matrix.outputs.matrix }}
secrets:
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
recordkey: ${{ secrets.CYPRESS_RECORD_KEY }}
reportportal_api_key: ${{ secrets.REPORTPORTAL_API_KEY }}
reportportal_endpoint: ${{ vars.REPORTPORTAL_ENDPOINT }}
reportportal_project: ${{ vars.REPORTPORTAL_PROJECT }}

release:
runs-on: ubuntu-latest
needs: call-workflow-e2e-prod
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
Expand Down

0 comments on commit bed6bf3

Please sign in to comment.