|
21 | 21 | required: true
|
22 | 22 |
|
23 | 23 | jobs:
|
24 |
| - # run-tests: |
25 |
| - # if: "${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}" |
26 |
| - # runs-on: ${{ matrix.os }} |
27 |
| - # env: |
28 |
| - # USING_COVERAGE: "3.10" |
29 |
| - # strategy: |
30 |
| - # matrix: |
31 |
| - # os: [ubuntu-latest, windows-latest, macos-latest] |
32 |
| - # permissions: |
33 |
| - # id-token: write |
34 |
| - # steps: |
35 |
| - # - name: Checkout Repository |
36 |
| - # uses: actions/checkout@v4 |
37 |
| - # with: |
38 |
| - # ref: ${{ inputs.ref }} |
39 |
| - # |
40 |
| - # - name: Setup Python |
41 |
| - # uses: actions/setup-python@v5 |
42 |
| - # with: |
43 |
| - # python-version: "3.10" |
44 |
| - # |
45 |
| - # - name: Install Poetry |
46 |
| - |
47 |
| - # |
48 |
| - # - name: Check pyproject.toml file |
49 |
| - # run: poetry check |
50 |
| - # |
51 |
| - # - name: Install tox |
52 |
| - # run: pip install tox |
53 |
| - # |
54 |
| - # - name: Authenticate with Google Cloud |
55 |
| - # id: auth |
56 |
| - # uses: google-github-actions/[email protected] |
57 |
| - # with: |
58 |
| - # # NOTE: If setting create_credentials_file=true, .dockerignore file must include `gha-creds-*.json` to avoid baking these credentials into build |
59 |
| - # create_credentials_file: true |
60 |
| - # workload_identity_provider: "projects/437801218871/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider" |
61 |
| - # service_account: "[email protected]" |
62 |
| - # |
63 |
| - # - name: Run tests |
64 |
| - # env: |
65 |
| - # TEST_PROJECT_NAME: ${{ secrets.TEST_PROJECT_NAME }} |
66 |
| - # GOOGLE_CLOUD_PROJECT: ${{ secrets.TEST_PROJECT_NAME }} |
67 |
| - # run: tox -vv -e py |
68 |
| - # |
69 |
| - # - name: Upload coverage to Codecov |
70 |
| - # uses: codecov/codecov-action@v4 |
71 |
| - # with: |
72 |
| - # files: coverage.xml |
73 |
| - # fail_ci_if_error: false |
74 |
| - # token: ${{ secrets.CODECOV_TOKEN }} |
| 24 | + run-tests: |
| 25 | + if: "${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }}" |
| 26 | + runs-on: ${{ matrix.os }} |
| 27 | + env: |
| 28 | + USING_COVERAGE: "3.10" |
| 29 | + strategy: |
| 30 | + matrix: |
| 31 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 32 | + permissions: |
| 33 | + id-token: write |
| 34 | + steps: |
| 35 | + - name: Checkout Repository |
| 36 | + uses: actions/checkout@v4 |
| 37 | + with: |
| 38 | + ref: ${{ inputs.ref }} |
| 39 | + |
| 40 | + - name: Setup Python |
| 41 | + uses: actions/setup-python@v5 |
| 42 | + with: |
| 43 | + python-version: "3.10" |
| 44 | + |
| 45 | + - name: Install Poetry |
| 46 | + |
| 47 | + |
| 48 | + - name: Check pyproject.toml file |
| 49 | + run: poetry check |
| 50 | + |
| 51 | + - name: Install tox |
| 52 | + run: pip install tox |
| 53 | + |
| 54 | + - name: Authenticate with Google Cloud |
| 55 | + id: auth |
| 56 | + uses: google-github-actions/[email protected] |
| 57 | + with: |
| 58 | + # NOTE: If setting create_credentials_file=true, .dockerignore file must include `gha-creds-*.json` to avoid baking these credentials into build |
| 59 | + create_credentials_file: true |
| 60 | + workload_identity_provider: "projects/437801218871/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider" |
| 61 | + service_account: "[email protected]" |
| 62 | + |
| 63 | + - name: Run tests |
| 64 | + env: |
| 65 | + TEST_PROJECT_NAME: ${{ secrets.TEST_PROJECT_NAME }} |
| 66 | + GOOGLE_CLOUD_PROJECT: ${{ secrets.TEST_PROJECT_NAME }} |
| 67 | + run: tox -vv -e py |
| 68 | + |
| 69 | + - name: Upload coverage to Codecov |
| 70 | + uses: codecov/codecov-action@v4 |
| 71 | + with: |
| 72 | + files: coverage.xml |
| 73 | + fail_ci_if_error: false |
| 74 | + token: ${{ secrets.CODECOV_TOKEN }} |
75 | 75 |
|
76 | 76 | release:
|
77 | 77 | runs-on: ubuntu-latest
|
78 |
| - # needs: run-tests |
| 78 | + needs: run-tests |
79 | 79 | steps:
|
80 | 80 | - name: Checkout Repository
|
81 | 81 | if: ${{ github.event_name != 'workflow_dispatch' }}
|
|
0 commit comments