Skip to content

Commit

Permalink
Provide missing env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rodelgc committed Feb 22, 2023
1 parent 146d986 commit 5f70773
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions .github/workflows/smoke-test-daily.yml
Expand Up @@ -8,7 +8,6 @@ env:
API_ARTIFACT: api-daily--run-${{ github.run_number }}
E2E_ARTIFACT: e2e-daily--run-${{ github.run_number }}
FORCE_COLOR: 1
BRANCH_NAME: ${{ github.ref_name }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,14 +20,19 @@ jobs:
name: API tests on nightly build
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
DEFAULT_TIMEOUT_OVERRIDE: 120000
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH_NAME }}

- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
Expand All @@ -49,10 +53,8 @@ jobs:
- name: Run API tests.
working-directory: plugins/woocommerce
env:
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
DEFAULT_TIMEOUT_OVERRIDE: 120000
run: pnpm exec playwright test --config=tests/api-core-tests/playwright.config.js hello.test.js

- name: Generate API Test report.
Expand All @@ -70,12 +72,12 @@ jobs:
${{ env.ALLURE_REPORT_DIR }}
if-no-files-found: ignore
retention-days: 5

e2e-tests:
name: E2E tests on nightly build
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
needs: [api-tests]
env:
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
Expand All @@ -90,8 +92,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH_NAME }}

- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
Expand Down Expand Up @@ -131,13 +131,11 @@ jobs:
name: k6 tests on nightly build
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
needs: [api-tests]
if: success() || failure()
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH_NAME }}

- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
Expand Down Expand Up @@ -183,7 +181,7 @@ jobs:
name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
needs: [api-tests]
env:
USE_WP_ENV: 1
Expand All @@ -208,8 +206,6 @@ jobs:
repo: 'takayukister/contact-form-7'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH_NAME }}

- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
Expand Down Expand Up @@ -259,7 +255,7 @@ jobs:
! github.event.pull_request.head.repo.fork
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
needs: [e2e-tests, test-plugins, k6-tests]
steps:
- name: Create dirs
Expand All @@ -273,7 +269,6 @@ jobs:
uses: actions/checkout@v3
with:
path: repo
ref: ${{ env.BRANCH_NAME }}

- name: Download API test report artifact
uses: actions/download-artifact@v3
Expand Down

0 comments on commit 5f70773

Please sign in to comment.