aboutsummaryrefslogblamecommitdiffstats
path: root/.github/workflows/wee-slack.yml
blob: 07c86f4887ecdba2c0c17f8c79b65ef1715fc389 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                        
       




                                                                          
 


                          
                                                                     
 
          

                                     

                                                      
 

                                             
 



                                                                               
 

                                                          
 


                                     
 


                           
name: wee-slack
on: [push, pull_request]

jobs:
  test:
    if: >
      github.event_name == 'push' || (
        github.event_name == 'pull_request' &&
        github.event.pull_request.head.repo.full_name != github.repository
      )

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - run: pip install --upgrade pipenv
      - run: pipenv install --dev --skip-lock

      - name: Lint with Flake8
        run: |
          # stop the build if there are Python syntax errors or undefined names
          pipenv run flake8 .

          # exit-zero treats all errors as warnings.
          pipenv run flake8 . --exit-zero --select=C,E,F,W

      - name: Check Python formatting
        run: |
          pipenv run black --check .

      - name: python/test
        run: |
          pipenv run pytest