From 6842562a7692fbe4172ff6e8a797a74eba6681ff Mon Sep 17 00:00:00 2001 From: Tobias Kadelka Date: Wed, 20 Mar 2024 11:00:03 +0100 Subject: [PATCH] BF: add CI to run flake8 Workflow file existed before, but was never triggered. --- .github/workflows/main.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 30fa586..34a2e04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,34 +1,33 @@ -# This is a basic workflow to help you get started with Actions +name: tests -name: prometheus_fzj_weather_exporter tests - -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the main branch push: - branches: [ main ] + branches: + - main pull_request: - branches: [ main ] jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3'] - + # 3.6 is minimal version of setup.py, 3.12 currently the newest + python-version: ['3.6', '3.12'] + steps: - uses: actions/checkout@v3 - + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} - name: git config run: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - + git config --global user.email "weather@exporter.com" + git config --global user.name "Weather Exporter" - name: Install dependencies run: | + pip install . pip install flake8 - - name: flake8 linting run: | - flake8 $(find . -type f -name "*.py") + flake8