Send messages without messages queues #879
Workflow file for this run
This file contains 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: Main | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
concurrency: | |
# find the branch name for 'pull_request' or on 'push' events | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Lint and test code | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
working-directory: ct-app | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff pytest -r requirements.txt | |
- name: Lint with ruff | |
working-directory: ct-app | |
run: | | |
# default set of ruff rules with GitHub Annotations | |
ruff --output-format=github --ignore E501 --target-version=py39 . | |
- name: Test with pytest | |
working-directory: ct-app | |
run: | | |
pytest test -W ignore::DeprecationWarning | |
image: | |
name: Build and push container image | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Calculate environment variables | |
shell: sh | |
run: echo "SHORT_SHA=`echo ${{ github.event.pull_request.head.sha }} | cut -c1-7`" >> $GITHUB_ENV | |
- name: Login to GCP | |
id: gcloud | |
uses: elgohr/gcloud-login-action@v1 #TODO - v2 is bugged, unable to get outputs | |
with: | |
account_key: ${{ secrets.GOOGLE_CREDENTIALS }} | |
- name: Build and push container image | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
workdir: "ct-app" | |
dockerfile: "./Dockerfile" | |
name: ${{ secrets.GOOGLE_PROJECT }}/${{ secrets.GOOGLE_REPOSITORY }}/cover-traffic | |
registry: ${{ secrets.GOOGLE_REGION }}-docker.pkg.dev | |
username: ${{ steps.gcloud.outputs.username }} | |
password: ${{ steps.gcloud.outputs.password }} | |
tags: "${{ env.SHORT_SHA }}" |