Files
new_lotto/.gitea/workflows/ci.yml
Workflow config file is invalid. Please check your config file: yaml: line 40: mapping values are not allowed in this context

41 lines
1.2 KiB
YAML

# Gitea Actions: 리포지토리 설정 → Actions → Secrets 에 동일 이름 등록
# 로컬은 프로젝트 루트 .env, CI 는 아래 secrets.* 가 환경변수로 주입됨
name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: 의존성 설치
run: pip install -r requirements.txt
- name: 단위 테스트
env:
CI: true
run: PYTHONPATH=src python -m unittest discover -s tests -v
# PR 은 fork 등에서 Secret 이 없을 수 있어 push 일 때만 검증
- name: Secret 기반 설정 로드 검증
if: github.event_name == 'push'
env:
CI: true
LOTTO_USERNAME: ${{ secrets.LOTTO_USERNAME }}
LOTTO_PASSWORD: ${{ secrets.LOTTO_PASSWORD }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: PYTHONPATH=src python -c "from config import load_config; load_config(); print('config: OK')"