build.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: auto CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. schedule:
  8. - cron: "0 2 * * 1-5"
  9. env:
  10. POETRY_VERSION: 1.8.3
  11. PYTHON_VERSION: "3.12"
  12. jobs:
  13. build:
  14. strategy:
  15. matrix:
  16. os: [ubuntu-latest]
  17. include:
  18. - os: ubuntu-latest
  19. path: ~/.cache/pip
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v4
  23. - name: Set up Python
  24. id: setup-python
  25. uses: actions/setup-python@v5
  26. with:
  27. python-version: ${{ env.PYTHON_VERSION }}
  28. - name: Install Poetry ${{ env.POETRY_VERSION }}
  29. uses: abatilo/actions-poetry@v3.0.0
  30. with:
  31. poetry-version: ${{ env.POETRY_VERSION }}
  32. - uses: actions/cache@v2
  33. with:
  34. path: ${{ matrix.path }}
  35. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
  36. restore-keys: |
  37. ${{ runner.os }}-pip-
  38. - uses: actions/cache@v2
  39. with:
  40. path: ~/.local/share/virtualenvs
  41. key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
  42. - name: Install dependencies
  43. run: |
  44. python -m pip install --upgrade pip
  45. if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
  46. - name: checkin
  47. run: |
  48. python main.py checkin