Skip to content

Merge pull request #161 from collinmutembei/dependabot/pip/pip-aed9f6… #415

Merge pull request #161 from collinmutembei/dependabot/pip/pip-aed9f6…

Merge pull request #161 from collinmutembei/dependabot/pip/pip-aed9f6… #415

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.8.2
- 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 }}