From a1a306b246a67674fb59a219173767da92af18a9 Mon Sep 17 00:00:00 2001 From: Diogo Matos Chaves Date: Thu, 25 Jan 2024 16:10:56 -0300 Subject: [PATCH] Add workflow for tests --- .github/workflows/run-tests.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..501ec17 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,34 @@ +# Your workflow name. +name: tests + +# Run workflow on every push to master branch. +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install and configure Poetry + uses: snok/install-poetry@v1.3.3 + with: + version: 1.7.1 + virtualenvs-create: false + - name: Install dependencies + run: | + poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi + - name: Test with pytest + run: | + python -m pytest --verbose --cov=stratestic --cov=tests --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false \ No newline at end of file