Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
risk: nonprod
  • Loading branch information
ivanmjartan committed Dec 17, 2024
1 parent 15c768f commit fac2b2a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 112 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- master
- release

pull_request_review:
types:
- submitted

concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand All @@ -22,16 +26,30 @@ jobs:
target-branch: ${{ github.event.pull_request.base.ref }}
secrets: inherit

e2e-tests:
runs-on:
[ubuntu-latest]
needs:
- build-validate-stage
if: |
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
steps:
- name: Run e2e tests
run: echo "Running e2e tests"
shell: bash
- name: test
run: echo "Running tests"

ready-to-merge:
runs-on:
group: infra1-runners-arc
labels: runners-small
if: always()
needs:
- build-validate-stage
- e2e-tests
steps:
- name: Check if needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}
114 changes: 3 additions & 111 deletions .github/workflows/rw-rush-build-basic-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,117 +9,9 @@ on:


jobs:
######################################################
# Warm up the cache pnmp and rush
######################################################
warm-up-cache:
runs-on:
group: infra1-runners-arc
labels: runners-cxa-xlarge
steps:
- uses: actions/checkout@v4
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: git-action
email: git-action@gooddata.com
- name: Warmup rush
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/rush/warm-up-rush

######################################################
# Warm up build cache and build changes see:STL-710
######################################################
build:
needs: [warm-up-cache]
runs-on:
group: infra1-runners-arc
labels: runners-rxa-xlarge
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: git-action
email: git-action@gooddata.com
- name: Debug
run: git log -1
- name: Setup rush
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/rush/set-up-rush
- name: Rush build
run: node common/scripts/install-run-rush.js build

######################################################
# Validate the changes
######################################################
validate:
needs: [warm-up-cache,build]
runs-on:
group: infra1-runners-arc
labels: runners-rxa-xlarge # for testing we need bigger runners
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: git-action
email: git-action@gooddata.com
- name: Setup rush
uses: ./.github/actions/rush/set-up-rush
- name: fetch target branch
run: git fetch origin ${TARGET_BRANCH}
- name: Rush build
run: |
node common/scripts/install-run-rush.js build
- name: Rush generate dynamic files related to build
run: node common/scripts/install-run-rush.js build-generate-version
- name: Rush validate
run: |
node common/scripts/install-run-rush.js validate-ci --impacted-by git:origin/${TARGET_BRANCH}
test:
needs: [warm-up-cache,build]
runs-on:
group: infra1-runners-arc
labels: runners-mxa-2xlarge #we need bigger runners
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TARGET_BRANCH: ${{ inputs.target-branch }}
ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: git-action
email: git-action@gooddata.com
- name: Setup rush
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./.github/actions/rush/set-up-rush
- name: fetch target branch
run: git fetch origin ${TARGET_BRANCH}
- name: Rush build
run: |
# build libs first, then the app
node common/scripts/install-run-rush.js build
- name: Rush generate dynamic files related to build
run: node common/scripts/install-run-rush.js build-generate-version
- name: Rush test-ci
run: |
node common/scripts/install-run-rush.js test-ci --impacted-by git:origin/${TARGET_BRANCH}
- name: Rush test-isolated-ci
run: |
node common/scripts/install-run-rush.js test-isolated-ci --impacted-by git:origin/${TARGET_BRANCH}
- name: Echo some test running
run: echo "Running tests"

0 comments on commit fac2b2a

Please sign in to comment.