name: Integration test for setup-kubectl-v1 on: # rebuild any PRs and main branch changes pull_request: branches: - main - 'releases/*' push: branches: - main - 'releases/*' jobs: run-integration-test: name: Validate release and master branch strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 name: Checkout from PR branch 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: python-version: '3.x' - name: Install requests library run: pip install requests - name: Validate kubectl setup run: python test/validate-kubectl.py latest - name: Setup kubectl uses: ./setup-kubectl with: version: 'v1.15.1' - name: Validate kubectl setup run: python test/validate-kubectl.py 'v1.15.1'