diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7abfc1f..1717726 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -17,26 +17,21 @@ jobs: os: [windows-latest, ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - name: Set job type - id: job-type - run: if [ '${{ github.event.inputs.reason }}' == 'cron' ]; then echo "::set-output name=type::$(echo cron)"; else echo "::set-output name=type::$(echo pr)"; fi - shell: bash - - uses: actions/checkout@v2 - if: steps.job-type.outputs.type == 'pr' name: Checkout from PR branch - with: - repository: Azure/setup-kubectl - ref: ${{ github.event.client_payload.frombranch }} - path: 'setup-kubectl' - - - uses: actions/checkout@v2 - if: steps.job-type.outputs.type == 'cron' - name: Checkout from main branch - with: - repository: Azure/setup-kubectl + with: path: 'setup-kubectl' + - id: action-npm-build + name: npm install and build + run: | + cd setup-kubectl + echo $PR_BASE_REF + if [[ $PR_BASE_REF != releases/* ]]; then + npm install + npm run build + fi + - uses: actions/setup-python@v2 name: Install Python with: @@ -45,17 +40,6 @@ jobs: - name: Install requests library run: pip install requests - - name: Building latest changes - if: steps.job-type.outputs.type == 'cron' || (steps.job-type.outputs.type == 'pr' && github.event.client_payload.tobranch == 'main') - run: | - cd setup-kubectl - npm install - npm run build - - name: Setup kubectl - uses: ./setup-kubectl - with: - version: latest - - name: Validate kubectl setup run: python test/validate-kubectl.py latest