Fix terraform deploy #80
Workflow file for this run
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: E2E Tests | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
run-e2e: | |
name: Run E2E Tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: datalens-tech/datalens-ui | |
ref: main | |
path: ./datalens-ui | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get last version config | |
run: | | |
VERSION_CONFIG=$(cat ./versions-config.json) | |
UI_VERSION=$(echo "${VERSION_CONFIG}" | jq -r '.uiVersion') | |
US_VERSION=$(echo "${VERSION_CONFIG}" | jq -r '.usVersion') | |
CONTROL_API_VERSION=$(echo "${VERSION_CONFIG}" | jq -r '.controlApiVersion') | |
DATA_API_VERSION=$(echo "${VERSION_CONFIG}" | jq -r '.dataApiVersion') | |
echo "UI_VERSION=$UI_VERSION" >> "$GITHUB_ENV" | |
echo "US_VERSION=$US_VERSION" >> "$GITHUB_ENV" | |
echo "CONTROL_API_VERSION=$CONTROL_API_VERSION" >> "$GITHUB_ENV" | |
echo "DATA_API_VERSION=$DATA_API_VERSION" >> "$GITHUB_ENV" | |
- name: Check docker compose Config | |
working-directory: ./datalens-ui/tests | |
run: npm run test:docker:check | |
env: | |
US_VERSION: ${{ env.US_VERSION }} | |
CONTROL_API_VERSION: ${{ env.CONTROL_API_VERSION }} | |
DATA_API_VERSION: ${{ env.DATA_API_VERSION }} | |
UI_VERSION: ${{ env.UI_VERSION }} | |
- name: Run tests from builded docker image | |
if: ${{ env.UI_VERSION != '' }} | |
working-directory: ./datalens-ui/tests | |
run: | | |
npm run test:e2e:docker | |
env: | |
US_VERSION: ${{ env.US_VERSION }} | |
CONTROL_API_VERSION: ${{ env.CONTROL_API_VERSION }} | |
DATA_API_VERSION: ${{ env.DATA_API_VERSION }} | |
UI_VERSION: ${{ env.UI_VERSION }} | |
- name: Copy tests report from docker run | |
if: always() | |
working-directory: ./datalens-ui/tests | |
run: | | |
echo "export report from docker run" | |
rm -rf ./artifacts | |
npm run test:e2e:docker:report | |
env: | |
US_VERSION: ${{ env.US_VERSION }} | |
CONTROL_API_VERSION: ${{ env.CONTROL_API_VERSION }} | |
DATA_API_VERSION: ${{ env.DATA_API_VERSION }} | |
UI_VERSION: ${{ env.UI_VERSION }} | |
- name: Run docker compose down | |
if: always() | |
working-directory: ./datalens-ui/tests | |
run: | | |
npm run test:docker:down | |
env: | |
US_VERSION: ${{ env.US_VERSION }} | |
CONTROL_API_VERSION: ${{ env.CONTROL_API_VERSION }} | |
DATA_API_VERSION: ${{ env.DATA_API_VERSION }} | |
UI_VERSION: ${{ env.UI_VERSION }} | |
- name: Save report link and pr number | |
if: always() | |
working-directory: ./datalens-ui | |
run: | | |
mkdir -p ./tests/artifacts | |
echo "reports/${{ github.head_ref || github.ref_name }}/${{ github.run_id }}/${{ github.run_attempt }}" > ./tests/artifacts/report-link | |
echo "${{ github.event.pull_request.number }}" > ./tests/artifacts/report-pr | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./datalens-ui/tests/artifacts/ | |
retention-days: 30 |