Skip to content

Commit

Permalink
test unit and integrations tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Jan 9, 2022
1 parent fa3bab6 commit 1be38a3
Showing 1 changed file with 58 additions and 58 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
# source ~/.profile
# install singularity
wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz
tar -xzf singularity-ce-${SINGULARITY_VERSION}.tar.gz
cd singularity-ce-${SINGULARITY_VERSION}
./mconfig
make -C builddir
sudo make -C builddir install
cd ..
# wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz
# tar -xzf singularity-ce-${SINGULARITY_VERSION}.tar.gz
# cd singularity-ce-${SINGULARITY_VERSION}
# ./mconfig
# make -C builddir
# sudo make -C builddir install
# cd ..
- name: Lint
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -67,58 +67,58 @@ jobs:
run: |
mkdir -p /opt/plantit-cli/runs/
python -m pytest /home/runner/work/plantit-cli/plantit-cli/plantit_cli/tests/unit -s
# integration-tests:
# runs-on: ubuntu-latest
# strategy:
# max-parallel: 1
# matrix:
# python-version: [3.6]
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# env:
# SINGULARITY_VERSION: ${{ secrets.SINGULARITY_VERSION }}
# run: |
# # python
# python -m pip install --upgrade pip
# pip install flake8 pytest coveralls setuptools wheel twine
# pip install -e .
integration-tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.6]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
SINGULARITY_VERSION: ${{ secrets.SINGULARITY_VERSION }}
run: |
# python
python -m pip install --upgrade pip
pip install flake8 pytest coveralls setuptools wheel twine
pip install -e .
# # singularity
# wget https://github.com/sylabs/singularity/releases/download/v3.8.0/singularity-ce-3.8.0.tar.gz
# tar -xzf singularity-ce-3.8.0.tar.gz
# cd singularity-ce-3.8.0
# ./mconfig
# make -C builddir
# sudo make -C builddir install
# - name: Lint
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test
# env:
# TEST_DIRECTORY: ${{ secrets.TEST_DIRECTORY }}
# CYVERSE_USERNAME: ${{ secrets.CYVERSE_USERNAME }}
# CYVERSE_PASSWORD: ${{ secrets.CYVERSE_PASSWORD }}
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
# COVERALLS_PARALLEL: true
# run: |
# mkdir -p /opt/plantit-cli/runs/
# coverage run --source=plantit_cli -m pytest /home/runner/work/plantit-cli/plantit-cli/plantit_cli/tests/integration -s
# coveralls
# - name: Update Coveralls
# run: |
# coveralls --finish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# singularity
# wget https://github.com/sylabs/singularity/releases/download/v3.8.0/singularity-ce-3.8.0.tar.gz
# tar -xzf singularity-ce-3.8.0.tar.gz
# cd singularity-ce-3.8.0
# ./mconfig
# make -C builddir
# sudo make -C builddir install
- name: Lint
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test
env:
TEST_DIRECTORY: ${{ secrets.TEST_DIRECTORY }}
CYVERSE_USERNAME: ${{ secrets.CYVERSE_USERNAME }}
CYVERSE_PASSWORD: ${{ secrets.CYVERSE_PASSWORD }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
mkdir -p /opt/plantit-cli/runs/
coverage run --source=plantit_cli -m pytest /home/runner/work/plantit-cli/plantit-cli/plantit_cli/tests/integration -s
coveralls
- name: Update Coveralls
run: |
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
needs: [unit-tests]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1be38a3

Please sign in to comment.