chore: poetry lock #170
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/CD Pipeline | |
# run it locally: | |
# act \ | |
# --secret DOCKER_USERNAME=$DOCKER_USERNAME \ | |
# --secret DOCKER_PASSWORD=$DOCKER_PASSWORD \ | |
# --secret SERVER_IP=$SERVER_IP \ | |
# --secret SERVER_USERNAME=$SERVER_USERNAME \ | |
# --secret SERVER_SSH_KEY="$SERVER_SSH_KEY" \ | |
# --env MEDIACLOUD_API_TOKEN=$MEDIACLOUD_API_TOKEN \ | |
# --env ACLED_EMAIL=$ACLED_EMAIL \ | |
# --env ACLED_KEY=$ACLED_KEY | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
# only run on backend or ci-cd changes | |
- 'backend-*/**' | |
- '.github/workflows/**' | |
pull_request: | |
branches: | |
- main | |
- dev | |
paths: | |
# only run on backend or ci-cd changes | |
- 'backend-*/**' | |
- '.github/workflows/**' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
- name: Install dependencies | |
run: | | |
cd backend-python | |
poetry install | |
- name: Run pytest | |
run: | | |
cd backend-python | |
poetry run pytest | |
env: | |
MEDIACLOUD_API_TOKEN: ${{ secrets.MEDIACLOUD_API_TOKEN }} | |
ACLED_EMAIL: ${{ secrets.ACLED_EMAIL }} | |
ACLED_KEY: ${{ secrets.ACLED_KEY }} | |
AZURE_API_BASE: ${{ secrets.AZURE_API_BASE }} | |
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }} | |
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }} | |
DATAFORSEO_EMAIL: ${{ secrets.DATAFORSEO_EMAIL }} | |
DATAFORSEO_PASSWORD: ${{ secrets.DATAFORSEO_PASSWORD }} | |
BUNDESTAG_API_KEY: ${{ secrets.BUNDESTAG_API_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
RAPIDAPI_KEY: ${{ secrets.RAPIDAPI_KEY }} | |