Skip to content

ci: set COVERALLS_SERVICE_NAME explicitly #10

ci: set COVERALLS_SERVICE_NAME explicitly

ci: set COVERALLS_SERVICE_NAME explicitly #10

Workflow file for this run

name: Continuous Integration
on:
push:
pull_request:
branches: [ master ]
release:
types: [ published ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install pip dependencies
run: |
pip install --upgrade pip
pip install --ignore-installed coveralls
- name: Run tests
env:
DOCKER_IMAGE: hepdata/hepdata-converter
run: |
export CURRENT_PATH=`pwd`
docker run -v $CURRENT_PATH:$CURRENT_PATH hepdata/hepdata-converter /bin/bash -c "cd $CURRENT_PATH && pip3 install -I -e .[tests] && coverage run -m unittest discover hepdata_converter_ws/testsuite 'test_*'"
docker run -v $CURRENT_PATH:$CURRENT_PATH hepdata/hepdata-converter /bin/bash -c "cd $CURRENT_PATH && pip3 install -I -e . && hepdata-converter-ws -v"
- name: Run coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
run: |
coveralls
deploy:
needs: test
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build PyPI package
env:
DOCKER_IMAGE: hepdata/hepdata-converter
run: |
export CURRENT_PATH=`pwd`
docker run -v $CURRENT_PATH:$CURRENT_PATH $DOCKER_IMAGE /bin/bash -c "cd $CURRENT_PATH && pip3 install wheel"
docker run -v $CURRENT_PATH:$CURRENT_PATH $DOCKER_IMAGE /bin/bash -c "cd $CURRENT_PATH && python3 setup.py sdist bdist_wheel"
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}