Merge pull request #73 from openSUSE/fix-shebang #173
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: CI | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
jobs: | |
ci: | |
name: Run the unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.tox | |
key: tox-${{ matrix.python_version }}-${{ hashFiles('poetry.lock') }} | |
- run: | | |
pip install --user pipx | |
pipx ensurepath | |
pipx install tox | |
pipx install poetry | |
sudo apt -y install python3-rpm | |
- run: | | |
export TOXENV=$(python -c "from sys import version_info; print(f'py{version_info[0]}{version_info[1]}')") | |
tox -- -vv | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v2 | |
# with: | |
# fail_ci_if_error: true | |
install: | |
name: Build and install the package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
pip install --user pipx | |
pipx ensurepath | |
pipx install tox | |
pipx install poetry | |
sudo apt -y install python3-rpm | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry/virtualenvs | |
key: poetry-${{ hashFiles('poetry.lock') }} | |
- run: | | |
poetry install | |
poetry build | |
pip install --user dist/replace_using_package_version-*whl | |
replace_using_package_version --help | |
integration: | |
name: Run the integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.tox | |
key: tox-${{ hashFiles('poetry.lock') }} | |
- run: sudo apt -y install python3-rpm | |
- run: pip install --user --upgrade tox | |
- run: 'tox -e integration -- -n auto -vv' | |
lint: | |
name: Lint the source code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
- uses: Gr1N/setup-poetry@v9 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.tox | |
key: tox-${{ hashFiles('poetry.lock') }} | |
- run: pip install --user --upgrade tox | |
- run: 'tox -e check' |