Feat/hierarchical workflow tracing #195
Workflow file for this run
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: | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| push: | |
| branches: | |
| - "main" | |
| paths-ignore: | |
| - "**.md" | |
| jobs: | |
| # In reality, this will not be completely accurate as only when a Docker image is deployed to GCP | |
| # we will truly have a deployed release. Nevertheless, this will be useful once it is deployed | |
| # since it will help add commits to releases | |
| release: | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| name: Create a Sentry release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| # This is necessary for the a release to include commits | |
| fetch-depth: 0 | |
| - name: Create Sentry release | |
| uses: getsentry/action-release@v1 | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| with: | |
| projects: "sentry-github-actions-app" | |
| environment: production | |
| # We have created releases from the PR, thus, the CLI gets confused finding commits | |
| ignore_missing: true | |
| docker-build: | |
| name: Docker build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Build | |
| run: | | |
| docker build -t docker-app . | |
| - name: Test starting | |
| run: | | |
| docker run -d --rm docker-app | |
| docker stop $(docker ps -aq) | |
| tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Set up | |
| run: | | |
| pip install tox | |
| - name: Run tests | |
| run: | | |
| tox | |
| - uses: codecov/codecov-action@v2 | |
| with: | |
| verbose: true # optional (default = false) | |
| pre-commit-checks: | |
| name: Pre-commit checks | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Set up | |
| run: | | |
| pip install wheel | |
| pip install pre-commit | |
| - name: Install hooks | |
| run: | | |
| pre-commit install | |
| - name: Run hooks | |
| run: | | |
| pre-commit run --all-files |