-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from felipeangelimvieira/feature/gh_actions
Workflow
- Loading branch information
Showing
3 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
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
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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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