Skip to content

Commit

Permalink
Use Github Environments and remove integrations workflow (#1790)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raalsky authored May 21, 2024
1 parent b088dd7 commit 0c43a0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 877 deletions.
90 changes: 10 additions & 80 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ on:
- master

env:
WORKSPACE_NAME: e2e-tests
WORKSPACE_NAME: ${{ vars.E2E_WORKSPACE_NAME }}
BUCKET_NAME: ${{ secrets.E2E_BUCKET_NAME }}
USER_USERNAME: ${{ secrets.E2E_USER_USERNAME }}
ADMIN_USERNAME: ${{ secrets.E2E_ADMIN_USERNAME }}
ADMIN_NEPTUNE_API_TOKEN: ${{ secrets.E2E_ADMIN_NEPTUNE_API_TOKEN }}
SERVICE_ACCOUNT_NAME: ${{ secrets.E2E_SERVICE_ACCOUNT_NAME }}
USER_USERNAME: ${{ vars.E2E_USER_USERNAME }}
NEPTUNE_API_TOKEN: ${{ secrets.E2E_USER_API_TOKEN }}
ADMIN_USERNAME: ${{ vars.E2E_ADMIN_USERNAME }}
ADMIN_NEPTUNE_API_TOKEN: ${{ secrets.E2E_ADMIN_API_TOKEN }}
SERVICE_ACCOUNT_NAME: ${{ vars.E2E_SERVICE_ACCOUNT_NAME }}

jobs:
e2e:
environment: Production
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -42,7 +44,7 @@ jobs:
- name: Test
uses: ./.github/actions/test-e2e
env:
NEPTUNE_API_TOKEN: ${{secrets.E2E_SERVICE_ACCOUNT_API_TOKEN}}
NEPTUNE_API_TOKEN: ${{ secrets.E2E_SERVICE_ACCOUNT_API_TOKEN }}
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand All @@ -52,6 +54,7 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_management:
environment: Production
timeout-minutes: 75
strategy:
fail-fast: false
Expand All @@ -74,8 +77,6 @@ jobs:

- name: Test
uses: ./.github/actions/test-e2e
env:
NEPTUNE_API_TOKEN: ${{secrets.E2E_NEPTUNE_API_TOKEN}}
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand All @@ -84,79 +85,8 @@ jobs:
report_job: 'management (${{ matrix.os }} - py${{ matrix.python-version }})'
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_s3_gcs:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.12" ]
os: [ ubuntu, windows ]
include:
- python-version: "3.8"
os: macos
- python-version: "3.12"
os: macos
runs-on: ${{ matrix.os }}-latest
name: 's3-gcs (${{ matrix.os }} - py${{ matrix.python-version }})'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Test
uses: ./.github/actions/test-e2e
env:
NEPTUNE_API_TOKEN: ${{secrets.E2E_SERVICE_ACCOUNT_API_TOKEN}}
AWS_ACCESS_KEY_ID: ${{secrets.E2E_GCS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.E2E_GCS_SECRET_ACCESS_KEY}}
S3_ENDPOINT_URL: "https://storage.googleapis.com/"
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
module: s3
name: s3-gcs
report_job: 's3-gcs (${{ matrix.os }} - py${{ matrix.python-version }})'
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e_s3:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
python-version: [ "3.7", "3.12" ]
os: [ ubuntu, windows ]
include:
- python-version: "3.8"
os: macos
- python-version: "3.12"
os: macos
runs-on: ${{ matrix.os }}-latest
name: 's3 (${{ matrix.os }} - py${{ matrix.python-version }})'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Test
uses: ./.github/actions/test-e2e
env:
NEPTUNE_API_TOKEN: ${{secrets.E2E_SERVICE_ACCOUNT_API_TOKEN}}
AWS_ACCESS_KEY_ID: ${{secrets.E2E_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.E2E_AWS_SECRET_ACCESS_KEY}}
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
module: s3
name: s3
report_job: 's3 (${{ matrix.os }} - py${{ matrix.python-version }})'
codecov-token: ${{ secrets.CODECOV_TOKEN }}

e2e-tests-notify:
needs: [ e2e, e2e_management, e2e_s3_gcs, e2e_s3 ]
needs: [ e2e, e2e_management ]
runs-on: ubuntu-latest
if: (success() || failure()) && github.ref == 'refs/heads/master'
steps:
Expand Down
Loading

0 comments on commit 0c43a0f

Please sign in to comment.