Skip to content

Commit

Permalink
fix: fix the deployment failed in Zeabur
Browse files Browse the repository at this point in the history
- fix the Python version number as 3.10.12
- Integrate to Poetry

Signed-off-by: Justin Xiao <[email protected]>
  • Loading branch information
ttpss930141011 committed Mar 28, 2024
1 parent 5f0fe78 commit 7f0ed3b
Show file tree
Hide file tree
Showing 16 changed files with 434 additions and 161 deletions.
97 changes: 50 additions & 47 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,54 @@ concurrency:
cancel-in-progress: true

on:
push:
branches: ["main"]
pull_request:
branches:
- '*'
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-pip-${{ hashFiles('requirements.txt') }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock pytest-coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest --cov
- name: Creating coverage folder
run: |
mkdir -p coverage
- name: Coverage Bagdge
uses: tj-actions/[email protected]
with:
output: coverage/coverage.svg

- name: Publish coverage report to coverage-badge branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: coverage-badge
folder: coverage
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-pip-${{ hashFiles('pyproject.toml') }}

- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install
- name: Test with pytest
run: |
pytest --cov
- name: Creating coverage folder
run: |
mkdir -p coverage
- name: Coverage Bagdge
uses: tj-actions/[email protected]
with:
output: coverage/coverage.svg

- name: Publish coverage report to coverage-badge branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: coverage-badge
folder: coverage
Binary file added .idea/copilot/chatSessions/00000000000.xd
Binary file not shown.
Binary file added .idea/copilot/chatSessions/blobs/version
Binary file not shown.
6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

95 changes: 95 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7f0ed3b

Please sign in to comment.