Merge remote-tracking branch 'origin/main' into chore/update-develop

This commit is contained in:
Rado 2023-10-06 16:14:09 +02:00
commit 3a1bb855aa
No known key found for this signature in database
GPG Key ID: DAF3EB1C00E368F7
2 changed files with 53 additions and 16 deletions

View File

@ -170,15 +170,6 @@ jobs:
preview_explorer: ${{ env.PREVIEW_EXPLORER }} preview_explorer: ${{ env.PREVIEW_EXPLORER }}
preview_tools: ${{ env.PREVIEW_TOOLS }} preview_tools: ${{ env.PREVIEW_TOOLS }}
# console-e2e:
# needs: build-sources
# name: '(CI) console python'
# uses: ./.github/workflows/console-test-run.yml
# secrets: inherit
# if: ${{ contains(fromJSON(needs.build-sources.outputs.projects), 'trading') && github.event_name == 'pull_request' }}
# with:
# github-sha: ${{ github.event.pull_request.head.sha || github.sha }}
check-e2e-needed: check-e2e-needed:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build-sources needs: build-sources
@ -212,6 +203,15 @@ jobs:
projects: ${{ needs.build-sources.outputs.projects-e2e }} projects: ${{ needs.build-sources.outputs.projects-e2e }}
tags: '@smoke' tags: '@smoke'
console-e2e:
needs: [build-sources, check-e2e-needed]
name: '(CI) console python'
uses: ./.github/workflows/console-test-run.yml
secrets: inherit
if: ${{ needs.check-e2e-needed.outputs.run-tests == 'true' }} && ${{ contains(fromJSON(needs.build-sources.outputs.projects), 'trading') }}
with:
github-sha: ${{ github.event.pull_request.head.sha || github.sha }}
publish-dist: publish-dist:
needs: build-sources needs: build-sources
name: '(CD) publish dist' name: '(CD) publish dist'

View File

@ -93,19 +93,56 @@ jobs:
name: console-image name: console-image
path: /tmp/console-image.tar path: /tmp/console-image.tar
console-test-branch:
name: Choose console-test branch to run on
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
console-branch: ${{ steps.output-step.outputs.branch }}
steps:
- name: Workflow dispatch input
id: dispatch-step
if: github.event_name == 'workflow_dispatch'
run: echo "branch=${{ inputs.console-test-branch }}" >> $GITHUB_OUTPUT
- name: Print Workflow dispatch input
if: github.event_name == 'workflow_dispatch'
run: echo ${{ steps.dispatch-step.outputs.branch }}
- name: Workflow_call input
id: workflow_call-step
if: github.event_name != 'workflow_dispatch'
run: |
if [[ "${{ github.base_ref }}" == "main" ]]; then
echo "branch=main" >> $GITHUB_OUTPUT
elif [[ "${{ github.base_ref }}" == "develop" && "${{ github.ref_name }}" == "main" ]]; then
echo "branch=main" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref_name }}" == *"release/mainnet"* ]]; then
echo "branch=main" >> $GITHUB_OUTPUT
else
echo "branch=develop" >> $GITHUB_OUTPUT
fi
- name: Print Workflow_call input
if: github.event_name != 'workflow_dispatch'
run: echo ${{ steps.workflow_call-step.outputs.branch }}
- name: Set output
id: output-step
run: echo "branch=${{ steps.dispatch-step.outputs.branch || steps.workflow_call-step.outputs.branch }}" >> $GITHUB_OUTPUT
- name: Print final output
run: echo ${{ steps.output-step.outputs.branch }}
run-tests: run-tests:
name: run-tests name: run-tests
runs-on: 8-cores runs-on: 8-cores
needs: create-docker-image needs: [create-docker-image, console-test-branch]
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
#---------------------------------------------- #----------------------------------------------
# load docker image # load docker image
#---------------------------------------------- #----------------------------------------------
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download docker image from previous job - name: Download docker image from previous job
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
@ -124,13 +161,13 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: vegaprotocol/console-test repository: vegaprotocol/console-test
ref: ${{ inputs.console-test-branch }} ref: ${{ needs.console-test-branch.outputs.console-branch }}
- name: Load console test envs - name: Load console test envs
id: console-test-env id: console-test-env
uses: falti/dotenv-action@v1.0.4 uses: falti/dotenv-action@v1.0.4
with: with:
path: '.env.${{ inputs.console-test-branch }}' path: '.env.${{ needs.console-test-branch.outputs.console-branch }}'
export-variables: true export-variables: true
keys-case: upper keys-case: upper
log-variables: true log-variables: true