๐๏ธ gitignore modern python stuff #56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a basic workflow to help you get started with Actions | |
| name: CI | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events | |
| push: | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
| jobs: | |
| # This workflow contains a single job called "build" | |
| build: | |
| # The type of runner that the job will run on | |
| runs-on: ubuntu-latest | |
| env: | |
| TRAVIS: 'true' # Skip tests requiring data | |
| strategy: | |
| matrix: | |
| python-version: | |
| - '2.7' | |
| - '3.10' | |
| - '3.11' | |
| - '3.12' | |
| name: Python ${{ matrix.python-version }} | |
| # Steps represent a sequence of tasks that will be executed as part of the job | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| #- name: Install system dependencies | |
| # run: | | |
| # sudo apt install gcc libffi-dev libssl-dev nodejs npm libyaml-dev libxslt1-dev | |
| - name: Set up Python ${{ matrix.python-version }} | |
| if: matrix.python-version >= '3' | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Python 2.7 | |
| if: matrix.python-version < '3' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python2.7 python2.7-dev | |
| sudo ln -sf python2.7 /usr/bin/python | |
| curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py | |
| python get-pip.py | |
| rm get-pip.py | |
| pip install --upgrade pip setuptools wheel | |
| - name: Install dependencies | |
| run: | | |
| pip install -e . | |
| - uses: BSFishy/pip-action@v1 | |
| with: | |
| packages: | | |
| coveralls | |
| - name: Unit tests | |
| run: | | |
| pytest --cov=yamlns | |
| - name: Coveralls | |
| uses: AndreMiras/coveralls-python-action@develop | |
| with: | |
| parallel: true | |
| flag-name: python-${{ matrix.python-version }} | |
| coveralls_finish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: AndreMiras/coveralls-python-action@develop | |
| with: | |
| parallel-finished: true |