Mercurial > p > roundup > code
comparison .github/workflows/ci-test.yml @ 6904:92b64fd3341f
cleanup, comments ready for production.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 01 Sep 2022 16:11:46 -0400 |
| parents | 02d91a31ed9a |
| children | 6010c20dc104 |
comparison
equal
deleted
inserted
replaced
| 6903:02d91a31ed9a | 6904:92b64fd3341f |
|---|---|
| 2 | 2 |
| 3 name: roundup-ci | 3 name: roundup-ci |
| 4 | 4 |
| 5 on: | 5 on: |
| 6 push: | 6 push: |
| 7 # skip if github.ref is 'refs/heads/maint-1.6' | |
| 8 # aka github.ref_name of 'maint-1.6' | |
| 9 # see https://github.com/orgs/community/discussions/26253 | |
| 10 # for mechanism to control matrix based on branch | |
| 7 branches: [ "*", '!maint-1.6' ] | 11 branches: [ "*", '!maint-1.6' ] |
| 8 # pull_request: | 12 # pull_request: |
| 9 # branches: [ "master" ] | 13 # branches: [ "master" ] |
| 10 schedule: | 14 schedule: |
| 11 # monthly build/check | 15 # monthly build/check |
| 22 strategy: | 26 strategy: |
| 23 fail-fast: false | 27 fail-fast: false |
| 24 max-parallel: 4 | 28 max-parallel: 4 |
| 25 matrix: | 29 matrix: |
| 26 # Run in all these versions of Python | 30 # Run in all these versions of Python |
| 27 python-version: [ "3.10", "3.11-dev" ] | 31 python-version: [ "2.7", "3.10", "3.9", "3.8", "3.6", "3.11-dev" ] |
| 28 # python-version: [ "2.7", "3.10", "3.9", "3.8", "3.6", "3.11-dev" ] | 32 |
| 29 # use for multiple os or ubuntu versions | 33 # use for multiple os or ubuntu versions |
| 30 #os: [ubuntu-latest, macos-latest, windows-latest] | 34 #os: [ubuntu-latest, macos-latest, windows-latest] |
| 31 os: [ubuntu-latest, ubuntu-22.04] | 35 os: [ubuntu-latest, ubuntu-22.04] |
| 36 | |
| 32 # if the ones above fail. fail the build | 37 # if the ones above fail. fail the build |
| 33 experimental: [false] | 38 experimental: [false] |
| 39 | |
| 34 include: | 40 include: |
| 35 # example: if 3.12 fails the jobs still succeeds | 41 # example: if 3.12 fails the jobs still succeeds |
| 36 # - python-version: 3.12 | 42 # - python-version: 3.12 |
| 37 # experimental: true | 43 # experimental: [true] |
| 38 - python-version: 2.7 | 44 # version 2,7 not available on unbuntu-22.04 github |
| 39 os: ubuntu-22.04 | 45 # - python-version: 2.7 |
| 40 experimental: true | 46 # os: ubuntu-22.04 |
| 47 # experimental: true | |
| 41 - python-version: 3.11-dev | 48 - python-version: 3.11-dev |
| 42 os: ubuntu-22.04 | 49 os: ubuntu-22.04 |
| 43 experimental: true | 50 experimental: [true] |
| 51 | |
| 44 exclude: | 52 exclude: |
| 45 # disable all python versions except as explicitly included | 53 # skip all python versions on 22.04 except explicitly included |
| 46 - os: ubuntu-22.04 | 54 - os: ubuntu-22.04 |
| 47 | 55 |
| 48 env: | 56 env: |
| 49 # get colorized pytest output even without a controlling tty | 57 # get colorized pytest output even without a controlling tty |
| 50 PYTEST_ADDOPTS: "--color=yes" | 58 PYTEST_ADDOPTS: "--color=yes" |
| 65 - name: Set Up Python ${{ matrix.python-version }} | 73 - name: Set Up Python ${{ matrix.python-version }} |
| 66 uses: actions/setup-python@v4 | 74 uses: actions/setup-python@v4 |
| 67 with: | 75 with: |
| 68 python-version: ${{ matrix.python-version }} | 76 python-version: ${{ matrix.python-version }} |
| 69 cache: 'pip' | 77 cache: 'pip' |
| 70 | |
| 71 - name: show matrix vars | |
| 72 run: | | |
| 73 echo 1. "${{ matrix.python-version }}" | |
| 74 echo 2. "$PYTHON_VERSION" | |
| 75 echo 3. "${{ matrix.os }}" | |
| 76 env | |
| 77 | |
| 78 - name: test if statement | |
| 79 if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' | |
| 80 run: echo "I ran so far awaaay" | |
| 81 | |
| 82 - name: test if statement os only | |
| 83 if: matrix.os == 'ubuntu-latest' | |
| 84 run: echo "I ran so far awaaay" | |
| 85 | 78 |
| 86 # Display the Python version being used | 79 # Display the Python version being used |
| 87 - name: Display Python version | 80 - name: Display Python version |
| 88 run: python -c "import sys; print(sys.version)" | 81 run: python -c "import sys; print(sys.version)" |
| 89 | 82 |
| 209 - name: test build_doc | 202 - name: test build_doc |
| 210 run: | | 203 run: | |
| 211 python ./setup.py build_doc | 204 python ./setup.py build_doc |
| 212 | 205 |
| 213 #- name: test docker build current version ubuntu-latest | 206 #- name: test docker build current version ubuntu-latest |
| 214 # if: {{ matrix.python_version == "3.10" && matrix.os == "ubuntu-latest" }} | 207 # if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' |
| 215 # run: | | 208 # run: | |
| 216 # docker build -t roundup-app-dev -f scripts/Docker/Dockerfile . | 209 # docker build -t roundup-app-dev -f scripts/Docker/Dockerfile . |
| 217 # mkdir tracker; chmod 777 tracker | 210 # mkdir tracker; chmod 777 tracker |
| 218 # docker run -d --rm -p 9017:8080 \ | 211 # docker run -d --rm -p 9017:8080 \ |
| 219 # -v $PWD/tracker:/usr/src/app/tracker \ | 212 # -v $PWD/tracker:/usr/src/app/tracker \ |
