This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
Bump requests from 2.31.0 to 2.32.0 #95
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: ci | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: [ published ] | |
jobs: | |
tests: | |
name: tests | |
runs-on: ubuntu-latest | |
env: | |
DATABASE_USER: postgres | |
DATABASE_HOST: "127.0.0.1" | |
DATABASE_NAME: eos | |
REDIS_URL: "redis://127.0.0.1:6379/0" | |
KEY_VAULT: "https://localhost" | |
AMEX_API_HOST: "http://localhost" | |
AMEX_CLIENT_ID: "dummy-amex-client-id" | |
AMEX_CLIENT_SECRET: "dummy-amex-client-secret" | |
SSO_ENABLED: "False" | |
services: | |
postgres: | |
image: postgres:latest | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_DB: eos | |
POSTGRES_HOST_AUTH_METHOD: trust | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- run: pip install poetry | |
- run: poetry config virtualenvs.create false | |
- run: poetry install --all-extras | |
- run: coverage run manage.py test -v 2 && coverage report | |
- run: xenon --max-average A --max-modules B --max-absolute B . | |
- run: mypy . | |
- run: ruff . | |
- run: black --check . | |
- run: isort --check . | |
release_dev: | |
if: github.event_name == 'push' | |
name: release_dev | |
environment: | |
name: dev | |
runs-on: ubuntu-latest | |
needs: [ tests ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: echo "container_tag=$(date +'%FT%H%M%SZ')" >> $GITHUB_ENV | |
- uses: docker/login-action@v2 | |
with: | |
registry: binkcore.azurecr.io | |
username: binkcore | |
password: ${{ secrets.ACR_BINKCORE_PASSWORD }} | |
- uses: docker/build-push-action@v4 | |
with: | |
push: true | |
tags: | | |
binkcore.azurecr.io/${{ github.event.repository.name }}:${{ env.container_tag }} | |
binkcore.azurecr.io/${{ github.event.repository.name }}:latest | |
release_staging: | |
if: github.event_name == 'release' && github.event.action == 'published' | |
name: release_staging | |
environment: | |
name: staging | |
runs-on: ubuntu-latest | |
needs: [tests] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: tag_check | |
run: | | |
if ! [[ ${{ github.event.release.tag_name }} =~ [0-9]+.[0-9]+.[0-9]+ ]]; then | |
exit 1; | |
fi | |
- uses: docker/login-action@v2 | |
with: | |
registry: binkcore.azurecr.io | |
username: binkcore | |
password: ${{ secrets.ACR_BINKCORE_PASSWORD }} | |
- uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: | | |
binkcore.azurecr.io/${{ github.event.repository.name }}:${{ github.event.release.tag_name }} | |
binkcore.azurecr.io/${{ github.event.repository.name }}:staging-${{ github.event.release.tag_name }} | |
binkcore.azurecr.io/${{ github.event.repository.name }}:staging | |
release_production: | |
if: github.event_name == 'release' && github.event.action == 'published' | |
name: release_production | |
environment: | |
name: production | |
needs: [release_staging] | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/binkhq/tagbot:latest | |
steps: | |
- run: | | |
tagbot \ | |
--username binkcore \ | |
--password ${{ secrets.ACR_BINKCORE_PASSWORD }} \ | |
--source binkcore.azurecr.io/${{ github.event.repository.name }}:${{ github.event.release.tag_name }} \ | |
--tag prod-${{ github.event.release.tag_name }} | |
tagbot \ | |
--username binkcore \ | |
--password ${{ secrets.ACR_BINKCORE_PASSWORD }} \ | |
--source binkcore.azurecr.io/${{ github.event.repository.name }}:${{ github.event.release.tag_name }} \ | |
--tag prod |