|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "master" |
| 7 | + - "dev" |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - "master" |
| 11 | + - "dev" |
| 12 | + schedule: |
| 13 | + # Run a cron job once daily |
| 14 | + - cron: "0 0 * * *" |
| 15 | + |
| 16 | +jobs: |
| 17 | + test: |
| 18 | + name: ${{ matrix.name }} |
| 19 | + runs-on: ${{ matrix.os }} |
| 20 | + strategy: |
| 21 | + fail-fast: false |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + - name: Linux, Python 3.7 |
| 25 | + os: ubuntu-latest |
| 26 | + python-version: "3.7" |
| 27 | + conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh |
| 28 | + |
| 29 | + - name: Linux, Python 3.9 |
| 30 | + os: ubuntu-latest |
| 31 | + python-version: "3.9" |
| 32 | + conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh |
| 33 | + |
| 34 | + - name: MacOS, Python 3.7 |
| 35 | + os: macOS-latest |
| 36 | + python-version: "3.7" |
| 37 | + conda-installer: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh |
| 38 | + |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v2 |
| 41 | + |
| 42 | + - uses: conda-incubator/setup-miniconda@v2 |
| 43 | + with: |
| 44 | + installer-url: ${{ matrix.conda-installer }} |
| 45 | + python-version: ${{ matrix.python-version }} |
| 46 | + activate-environment: test |
| 47 | + channel-priority: true |
| 48 | + environment-file: devtools/conda-envs/env.yaml |
| 49 | + auto-activate-base: false |
| 50 | + use-mamba: true |
| 51 | + |
| 52 | + - name: Additional info about the build |
| 53 | + shell: bash |
| 54 | + run: | |
| 55 | + uname -a |
| 56 | + df -h |
| 57 | + ulimit -a |
| 58 | + - name: Environment Information |
| 59 | + shell: bash -l {0} |
| 60 | + run: | |
| 61 | + conda info --all |
| 62 | + conda list |
| 63 | + mamba --version |
| 64 | + - name: Install package |
| 65 | + shell: bash -l {0} |
| 66 | + run: | |
| 67 | + python -m pip install --no-deps . |
| 68 | + - name: Run tests |
| 69 | + shell: bash -l {0} |
| 70 | + run: | |
| 71 | + pytest -v --cov=openff/arsenic --cov-report=xml --color=yes openff/arsenic/tests/ |
| 72 | + - name: CodeCov |
| 73 | + uses: codecov/codecov-action@v1 |
| 74 | + if: always() |
| 75 | + with: |
| 76 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 77 | + file: ./coverage.xml |
| 78 | + flags: unittests |
| 79 | + yml: ./.codecov.yml |
| 80 | + |
| 81 | + lint-format: |
| 82 | + name: Lint & format checks |
| 83 | + runs-on: ubuntu-18.04 |
| 84 | + |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v2 |
| 87 | + |
| 88 | + - uses: conda-incubator/setup-miniconda@v2 |
| 89 | + with: |
| 90 | + installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh |
| 91 | + python-version: "3.7" |
| 92 | + activate-environment: test |
| 93 | + channel-priority: true |
| 94 | + environment-file: devtools/conda-envs/env.yaml |
| 95 | + auto-activate-base: false |
| 96 | + use-mamba: true |
| 97 | + |
| 98 | + - name: Additional info about the build |
| 99 | + shell: bash |
| 100 | + run: | |
| 101 | + uname -a |
| 102 | + df -h |
| 103 | + ulimit -a |
| 104 | + - name: Environment Information |
| 105 | + shell: bash -l {0} |
| 106 | + run: | |
| 107 | + conda info --all |
| 108 | + conda list |
| 109 | + - name: Install linter / formatter |
| 110 | + shell: bash -l {0} |
| 111 | + run: | |
| 112 | + mamba install pylint black |
| 113 | + - name: Install package |
| 114 | + shell: bash -l {0} |
| 115 | + run: | |
| 116 | + python -m pip install --no-deps . |
| 117 | + - name: Run pylint |
| 118 | + shell: bash -l {0} |
| 119 | + run: | |
| 120 | + pylint openff/arsenic/ --fail-under 6 |
| 121 | + - name: Run black check |
| 122 | + shell: bash -l {0} |
| 123 | + if: always() |
| 124 | + run: | |
| 125 | + black --check -l 99 openff/arsenic/ --exclude openff/arsenic/_version.py |
0 commit comments