Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maksadbek committed Nov 9, 2024
1 parent 25c9bdd commit e175455
Showing 1 changed file with 38 additions and 37 deletions.
75 changes: 38 additions & 37 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,48 +184,49 @@ jobs:
# E2E_REPEATER_TARGET_CMD: ${{ steps.target.outputs.cmd }}
# E2E_TEST_TIMEOUT: ${{ inputs.test_timeout }}

docker:
if: ${{ inputs.test-docker }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Windows can't run linux docker images: https://github.com/actions/runner-images/issues/1143
os: [ubuntu-latest, macos-latest]
steps:
- name: Install Docker (MacOS)
if: ${{ startsWith(matrix.os, 'macos') }}
uses: docker-practice/actions-setup-docker@master
timeout-minutes: 12
# docker:
# if: ${{ inputs.test-docker }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# # Windows can't run linux docker images: https://github.com/actions/runner-images/issues/1143
# os: [ubuntu-latest, macos-latest]
# steps:
# - name: Install Docker (MacOS)
# if: ${{ startsWith(matrix.os, 'macos') }}
# uses: docker-practice/actions-setup-docker@master
# timeout-minutes: 12

- name: Pull Image
run: docker pull brightsec/cli:${{ inputs.version }}
# - name: Pull Image
# run: docker pull brightsec/cli:${{ inputs.version }}

- name: Checkout Repository
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5@v2
# - name: Checkout Repository
# uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5@v2

- name: Download Target
id: target
uses: ./.github/workflows/composite/todoapp
# - name: Download Target
# id: target
# uses: ./.github/workflows/composite/todoapp

- name: Install Dependencies
uses: ./.github/workflows/composite/npm
with:
# https://github.com/actions/setup-node/issues/286#issuecomment-878865957
cache: ''
# - name: Install Dependencies
# uses: ./.github/workflows/composite/npm
# with:
# # https://github.com/actions/setup-node/issues/286#issuecomment-878865957
# cache: ''

# - name: Run Tests
# run: npm run test:e2e
# env:
# E2E_CLI_VERSION: ${{ inputs.version }}
# E2E_CLI_CMD: docker run --add-host host.docker.internal:host-gateway --network host brightsec/cli:${{ inputs.version }}
# E2E_RUN_ID: ${{ format('{0}-{1}-{2}-{3}', github.run_number, github.run_attempt, github.job, strategy.job-index) }}
# E2E_CLUSTER: ${{ vars[format('E2E_{0}_HOST', inputs.environment )] }}
# E2E_PROJECT_ID: ${{ vars[format('E2E_{0}_PROJECT_ID', inputs.environment )] }}
# E2E_CLUSTER_API_KEY: ${{ secrets[format('E2E_{0}_API_KEY', inputs.environment )] }}
# E2E_REPEATER_TARGET_URL: ${{ format('http://host.docker.internal:{0}', steps.target.outputs.port) }}
# E2E_REPEATER_TARGET_CMD: ${{ steps.target.outputs.cmd }}
# E2E_TEST_TIMEOUT: ${{ inputs.test_timeout }}

- name: Run Tests
run: npm run test:e2e
env:
E2E_CLI_VERSION: ${{ inputs.version }}
E2E_CLI_CMD: docker run --add-host host.docker.internal:host-gateway --network host brightsec/cli:${{ inputs.version }}
E2E_RUN_ID: ${{ format('{0}-{1}-{2}-{3}', github.run_number, github.run_attempt, github.job, strategy.job-index) }}
E2E_CLUSTER: ${{ vars[format('E2E_{0}_HOST', inputs.environment )] }}
E2E_PROJECT_ID: ${{ vars[format('E2E_{0}_PROJECT_ID', inputs.environment )] }}
E2E_CLUSTER_API_KEY: ${{ secrets[format('E2E_{0}_API_KEY', inputs.environment )] }}
E2E_REPEATER_TARGET_URL: ${{ format('http://host.docker.internal:{0}', steps.target.outputs.port) }}
E2E_REPEATER_TARGET_CMD: ${{ steps.target.outputs.cmd }}
E2E_TEST_TIMEOUT: ${{ inputs.test_timeout }}
npm:
if: ${{ inputs.test-npm }}
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit e175455

Please sign in to comment.