From ea80a1ee42af0741ab7b192b8b6673d217117174 Mon Sep 17 00:00:00 2001 From: Willem Pienaar <6728866+woop@users.noreply.github.com> Date: Sat, 6 Mar 2021 12:20:19 -0800 Subject: [PATCH] Add support for privileged tests (#1369) Signed-off-by: Willem Pienaar --- .github/workflows/privileged.yml | 33 +++++++++++++++++++ .../{complete.yml => unprivileged.yml} | 5 ++- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/privileged.yml rename .github/workflows/{complete.yml => unprivileged.yml} (96%) diff --git a/.github/workflows/privileged.yml b/.github/workflows/privileged.yml new file mode 100644 index 00000000000..137b577335a --- /dev/null +++ b/.github/workflows/privileged.yml @@ -0,0 +1,33 @@ +name: privileged + +on: + pull_request_target: + types: + - opened + - synchronize + - labeled + +jobs: + integration-test-python: + # all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes. + if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved') + runs-on: ubuntu-latest + container: gcr.io/kf-feast/feast-ci:latest + steps: + - uses: actions/checkout@v2 + with: + # pull_request_target runs the workflow in the context of the base repo + # as such actions/checkout needs to be explicit configured to retrieve + # code from the PR. + ref: ${{ github.event.pull_request.merge_commit_sha }} + submodules: recursive + - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master + with: + version: '290.0.1' + export_default_credentials: true + project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} + - name: Install python + run: make install-python + - name: Test python + run: FEAST_TELEMETRY=False pytest --verbose --color=yes sdk/python/tests --integration \ No newline at end of file diff --git a/.github/workflows/complete.yml b/.github/workflows/unprivileged.yml similarity index 96% rename from .github/workflows/complete.yml rename to .github/workflows/unprivileged.yml index ebe0216a0f6..8f77c5823fe 100644 --- a/.github/workflows/complete.yml +++ b/.github/workflows/unprivileged.yml @@ -1,4 +1,4 @@ -name: complete +name: unprivileged on: [push, pull_request] @@ -45,5 +45,4 @@ jobs: - name: Install dependencies run: make compile-protos-go - name: Test go - run: make test-go - + run: make test-go \ No newline at end of file