Skip to content

Merge pull request #101 from collinmutembei/dependabot/pip/jinja2-3.1.3 #224

Merge pull request #101 from collinmutembei/dependabot/pip/jinja2-3.1.3

Merge pull request #101 from collinmutembei/dependabot/pip/jinja2-3.1.3 #224

Workflow file for this run

name: CI/CD
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
env:
DATABASE_URL: mongodb://localhost:27017
API_ENV: 🛠
GOOGLE_CLIENT_ID: test
GOOGLE_CLIENT_SECRET: test
MINIO_ACCESS_KEY: test
MINIO_SECRET_KEY: test
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.12
- uses: pre-commit/action@v3.0.0
test:
runs-on: ubuntu-latest
needs: [check]
services:
mongodb:
image: mongodb/mongodb-community-server:latest
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Setup poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.6.1
- name: Install dependencies
run: poetry install
- name: Run tests
run: cd src && poetry run pytest
package:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and publish app
uses: openzim/docker-publish-action@v10
with:
image-name: collinmutembei/people
on-master: latest
latest-on-tag: true
restrict-to: collinmutembei/people
registries: |
ghcr.io
credentials: |
GHCRIO_USERNAME=${{ github.repository_owner }}
GHCRIO_TOKEN=${{ secrets.CR_PAT }}
build-args: |
PROJECT_VERSION=latest
COMMIT_ID=${{ github.sha }}