Skip to content

Commit

Permalink
Merge pull request #5 from felipeangelimvieira/feature/gh_actions
Browse files Browse the repository at this point in the history
Workflow
  • Loading branch information
felipeangelimvieira authored Apr 29, 2024
2 parents d7addba + 0c0b229 commit e4af422
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.create false # Avoids creating an additional virtual environment
- name: Install dependencies
run: poetry install --no-interaction --no-root --all-extras

- name: Set PYTHONPATH
run: echo "PYTHONPATH=$GITHUB_WORKSPACE/src" >> $GITHUB_ENV

- name: Test with pytest
run: poetry run pytest --cov=prophetverse --cov-report=xml

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: ./coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
89 changes: 88 additions & 1 deletion poetry.lock

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

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mkdocs = "^1.5.3"
mkdocstrings-python = "^1.9.0"
mkdocs-jupyter = "^0.24.6"
pymdown-extensions = "^10.7.1"
pytest-cov = "^5.0.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit e4af422

Please sign in to comment.