From 658c98c9a92c67f588ff27ab3d391f18b55e109b Mon Sep 17 00:00:00 2001 From: Pyry Lahtinen Date: Sat, 11 Nov 2023 16:07:44 +0200 Subject: [PATCH] added github action for automatic tests --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e373075 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - name: Install Poetry + run: pip install poetry + - name: Install dependencies + run: poetry install + - name: Run coverage + run: poetry run invoke coverage + - name: Create coverage report + run: poetry run coverage xml + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: Run lint + run: poetry run invoke lint