Merge pull request #40 from AGILESCIENCE/develop #544
This file contains 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
name: Continuous integration workflow | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
- selection_of_response_matrices | |
- deprecation_of_emin_emax | |
- feature-* | |
- 14-read_ratemeters | |
jobs: | |
building-testing-on-ubuntu-matrix: | |
name: Build+Test ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-22.04", "ubuntu-20.04"] | |
python-version: ["3.8.13"] | |
runs-on: ${{matrix.os}} | |
container: | |
image: agilescience/agilepy-recipe:BUILD25b6-v3 | |
options: --user 0 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Debug | |
shell: bash -l {0} | |
run: | | |
pwd | |
ls -la | |
- name: Installing Agilepy | |
shell: bash -l {0} | |
run: | | |
python3 -m pip install -r requirements.lock | |
python3 -m pip install colorama | |
python3 -m pip install . | |
- name: Running unit tests and code coverage | |
shell: bash -l {0} | |
run: start_coverage.sh | |
# building-testing-on-os-matrix: | |
# name: Build+Test ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# os: ["macos-10.15"] | |
# python-version: ["3.8.13"] | |
# runs-on: ${{matrix.os}} | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: conda-incubator/setup-miniconda@v2 | |
# with: | |
# auto-update-conda: false | |
# python-version: ${{ matrix.python-version }} | |
# environment-file: .github/environment.yml | |
# activate-environment: agilepydevops | |
# - name: Installing Agilepy | |
# shell: bash -l {0} | |
# run: python setup.py develop | |
# - name: Conda info | |
# shell: bash -l {0} | |
# run: | | |
# conda info | |
# conda list | |
# - name: Running unit tests and code coverage | |
# shell: bash -l {0} | |
# run: | | |
# printf "import pkg_resources \npath = pkg_resources.require('agilepy')[0].location \nprint(path+'/agilepy')" > get_agilepy_installation_folder.py | |
# agilepy_path=$((python get_agilepy_installation_folder.py) 2>&1) | |
# bash $agilepy_path/scripts/start_coverage.sh | |
building-testing-on-os-centos7: | |
name: Build+Test Docker container | |
runs-on: ubuntu-20.04 | |
container: | |
image: agilescience/agilepy-recipe:BUILD25b6-v3 | |
options: --user 0 | |
steps: | |
- name: Checking out code | |
uses: actions/checkout@v3 | |
- name: Debug | |
shell: bash -l {0} | |
run: | | |
pwd | |
ls -la | |
- name: Installing Agilepy | |
shell: bash -l {0} | |
run: | | |
python3 -m pip install -r requirements.lock | |
python3 -m pip install colorama | |
python3 -m pip install . | |
- name: Running unit tests and code coverage | |
shell: bash -l {0} | |
run: start_coverage.sh | |
- name: Uploading coverage report to Codacy | |
shell: bash -l {0} | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }} | |
CODACY_PROJECT_NAME: ${{ secrets.CODACY_PROJECT_NAME }} | |
CODACY_USERNAME: ${{ secrets.CODACY_USERNAME }} | |
run: | | |
curl -Ls https://coverage.codacy.com/get.sh -o get.sh | |
chmod +x get.sh | |
./get.sh report -r $HOME/cov_xml_report --commit-uuid "$GITHUB_SHA" | |
#- name: Triggering dockerhub for container building | |
# shell: bash -l {0} | |
# run: | | |
# curl -H "Content-Type: application/json" \ | |
# --data '{"source_type": "Branch", "source_name": "develop"}' \ | |
# -X POST "https://hub.docker.com/api/build/v1/source/2e3f2827-4912-486e-9353-43f2e540c25b/trigger/6b916551-0929-46b7-bc2b-74115a63017b/call/" |