-
Notifications
You must be signed in to change notification settings - Fork 55
95 lines (77 loc) · 2.85 KB
/
build-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: build-macos
on:
push:
branches: master
# To be able to trigger a manual build
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Miniconda (Python ${{ matrix.python-version }})
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: pyani-github
auto-activate-base: false
channels: defaults,bioconda,conda-forge
channel-priority: flexible
- name: Check Miniconda Installation
run: |
conda info
conda list
- name: Install pip
run: python -m pip install --upgrade pip
- name: Install Development Requirements
run: conda install --file requirements-dev.txt -y
- name: Install Requirements
run: conda install --file requirements.txt -y
- name: Install third-party tools
run: conda install --file requirements-thirdparty-macos.txt -y
- name: Install and Check FastANI
run: |
conda install --file requirements-fastani-macos.txt -y
fastani -h
- name: Install PyQT
run: conda install --file requirements-pyqt-conda.txt -y
- name: Install pip requirements
run: pip install -r requirements-pip.txt
- name: Install pyani
run: pip install -e .
- name: Check pytest modules
run: python -m pytest -v --collect-only
- name: Run Tests with pytest
run: python -m pytest -v --cov=pyani --cov-report=xml:.coverage-macos-${{ matrix.python-version }}.xml
- name: Store coverage results
uses: actions/upload-artifact@v4
with:
name: test-coverage-macos-${{ matrix.python-version }}
path: .coverage-macos-${{ matrix.python-version }}.xml
retention-days: 3
if: ${{ always() }}
- name: Codacy Coverage Reporter
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: .coverage-linux-${{ matrix.python-version }}.xml
if: ${{ always() }}
- name: Codecov Coverage Report
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true # optional (default = false)
files: .coverage-macos-${{ matrix.python-version }}.xml # optional
name: codecov-umbrella-macos-${{ matrix.python-version }}.xml # optional
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)
if: ${{ always() }}