1name: Infra tests 2on: 3 pull_request: 4 paths: 5 - 'infra/**' 6 7jobs: 8 build: 9 runs-on: ubuntu-latest 10 11 steps: 12 - name: Cancel previous 13 uses: styfle/cancel-workflow-action@0.8.0 14 with: 15 access_token: ${{ github.token }} 16 17 - uses: actions/checkout@v2 18 - run: | # Needed for git diff to work. 19 git fetch origin master --depth 1 20 git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master 21 22 - name: Setup python environment 23 uses: actions/setup-python@v2 24 with: 25 python-version: 3.8 26 27 - name: Install dependencies 28 run: | 29 sudo env "PATH=$PATH" python -m pip install --upgrade pip 30 sudo env "PATH=$PATH" pip install -r infra/ci/requirements.txt 31 sudo env "PATH=$PATH" pip install -r infra/build/functions/requirements.txt 32 33 - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master 34 with: 35 version: '298.0.0' 36 - run: | 37 sudo env "PATH=$PATH" gcloud components install beta cloud-datastore-emulator 38 39 - name: Run infra tests 40 run: sudo env "PATH=$PATH" INTEGRATION_TESTS=1 python infra/presubmit.py infra-tests -p 41