From ae0841a6aa1e164d9d99f02e2cde777446b28dbd Mon Sep 17 00:00:00 2001 From: WanMok <16273544+wanmok@users.noreply.github.com> Date: Sat, 16 Sep 2023 17:12:25 -0400 Subject: [PATCH] Added GitHub action to run linter and tests. --- .github/workflows/python-app.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 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..01008e2 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,38 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: "3.9" + - name: Setup Poetry + uses: Gr1N/setup-poetry@v8 + with: + poetry-version: 1.6.1 + - name: Install dependencies + run: | + poetry install --with dev + - uses: chartboost/ruff-action@v1 + with: + version: 0.0.290 + - name: Test with pytest + run: | + pytest