From 79b142b23ee737aeef5e5cb753954f9302bbb7a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1ty=C3=A1s=20Kuti?= Date: Sun, 15 Oct 2023 19:48:37 +0200 Subject: [PATCH] Create GitHub actions CI definition --- .github/workflows/python-app.yml | 34 ++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..bf69a31 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,34 @@ +name: Lint and test +on: + - push +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.10" + - "3.11" + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Pre-install dependencies + run: | + make install_lint_requirements + make install_test_requirements + - name: Lint + run: | + make lint + - name: Test + run: | + make test diff --git a/README.md b/README.md index 6d78764..456a76d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # python-project-template +![Test status](https://github.com/matyaskuti/python-project-template/actions/workflows/python-app.yml/badge.svg +) + A [`cookiecutter`](https://github.com/audreyr/cookiecutter) based Python project template.