Bump google.golang.org/api from 0.40.0 to 0.223.0 in /go #1363
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| env: | |
| SECRETS_ARE_AVAILABLE: ${{ secrets.SECRETS_ARE_AVAILABLE }} | |
| jobs: | |
| test-go: | |
| name: "Test (Go)" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources | |
| platform: [ubuntu-20.04, macos-10.15] | |
| runs-on: ${{ matrix.platform }} | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: go | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.14 | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ secrets.CACHE_VERSION }}- | |
| - name: Configure AWS Credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Setup GCP credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: google-github-actions/[email protected] | |
| with: | |
| version: "290.0.1" | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| service_account_key: ${{ secrets.GCP_SA_KEY }} | |
| export_default_credentials: true | |
| - name: "Build" | |
| run: make build-all | |
| - name: "Validate" | |
| run: make validate | |
| - name: Test | |
| if: ${{ !env.SECRETS_ARE_AVAILABLE }} | |
| run: make test | |
| - name: Test (external) | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| run: make test-external | |
| test-python: | |
| name: "Test (Python)" | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: python | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: [3.6, 3.7, 3.8] | |
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources | |
| platform: [ubuntu-20.04, macos-10.15] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ secrets.CACHE_VERSION }}- | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-test.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ secrets.CACHE_VERSION }}- | |
| - name: Configure AWS Credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Setup GCP credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: google-github-actions/[email protected] | |
| with: | |
| version: "290.0.1" | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| service_account_key: ${{ secrets.GCP_SA_KEY }} | |
| export_default_credentials: true | |
| - name: Install | |
| run: | | |
| (cd ../ && make install-test-dependencies) | |
| (cd ../ && make install) | |
| - name: Test | |
| if: ${{ !env.SECRETS_ARE_AVAILABLE }} | |
| run: make test | |
| - name: Test (external) | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| run: make test-external | |
| test-python-nodeps: | |
| name: "Test (Python, no dependencies installed)" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources | |
| platform: [ubuntu-20.04, macos-10.15] | |
| runs-on: ${{ matrix.platform }} | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: nodeps-test | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.14 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.7 | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ secrets.CACHE_VERSION }}- | |
| - name: Install | |
| run: | | |
| (cd ../ && make install) | |
| - name: Test | |
| run: make test | |
| test-end-to-end: | |
| name: "Test (end to end)" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources | |
| platform: [ubuntu-20.04, macos-10.15] | |
| runs-on: ${{ matrix.platform }} | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: end-to-end-test | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.14 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.7 | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ secrets.CACHE_VERSION }}- | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-test.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ secrets.CACHE_VERSION }}- | |
| - name: Configure AWS Credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Setup GCP credentials | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| uses: google-github-actions/[email protected] | |
| with: | |
| version: "290.0.1" | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| service_account_key: ${{ secrets.GCP_SA_KEY }} | |
| export_default_credentials: true | |
| - name: Write private key | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| run: | | |
| echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/private_key.pem | |
| chmod 400 /tmp/private_key.pem | |
| - name: Install | |
| run: | | |
| (cd ../ && make install-test-dependencies) | |
| (cd ../ && make install) | |
| - name: Test | |
| if: ${{ !env.SECRETS_ARE_AVAILABLE }} | |
| run: make test | |
| - name: Test (external) | |
| if: ${{ env.SECRETS_ARE_AVAILABLE }} | |
| run: make test-external | |
| release: | |
| needs: [test-go, test-python, test-python-nodeps, test-end-to-end] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-go@v2 | |
| with: | |
| go-version: 1.14 | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.7 | |
| - name: Setup GCP credentials | |
| uses: google-github-actions/[email protected] | |
| with: | |
| version: "290.0.1" | |
| project_id: ${{ secrets.GCP_PROJECT_ID }} | |
| service_account_key: ${{ secrets.GCP_SA_KEY }} | |
| export_default_credentials: true | |
| - name: Build | |
| run: make build ENVIRONMENT=production | |
| - name: Push Python package | |
| uses: pypa/gh-action-pypi-publish@master | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_PASSWORD }} | |
| packages_dir: python/dist |