From 8b2cdd3ce28453e3a668aa3d03dcd98419fe3dcb Mon Sep 17 00:00:00 2001 From: AndyTitu Date: Tue, 21 May 2024 14:14:58 +0200 Subject: [PATCH 1/2] Run integration tests only on internal PRs on all target OSes --- .github/workflows/validate.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 13d727ba..32756831 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -5,14 +5,14 @@ on: push: paths-ignore: - '**.md' - pull_request: - paths-ignore: - - '**.md' jobs: validate: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -21,14 +21,26 @@ jobs: with: python-version: '3.x' - - name: Test with pytest + - name: Integration Test + if: github.repository_owner == '1Password' # don't run integration tests on forked PRs because those don't have access to pipeline secrets env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }} run: | pip install pytest && pip install pytest-asyncio && pip install pydantic && - python -m pytest src/onepassword/*.py + python -m pytest src/onepassword/test_client.py + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Lint with Ruff run: | From 0b63f7554c8bea18b0f6a2bc6ab8f5732d52da1a Mon Sep 17 00:00:00 2001 From: AndyTitu Date: Wed, 22 May 2024 16:04:09 +0200 Subject: [PATCH 2/2] Remove the line that except integration tests from being run from forks --- .github/workflows/validate.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 32756831..9e79899c 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -22,7 +22,6 @@ jobs: python-version: '3.x' - name: Integration Test - if: github.repository_owner == '1Password' # don't run integration tests on forked PRs because those don't have access to pipeline secrets env: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }} run: |