diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 3091d11..08d17a4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -27,16 +27,19 @@ jobs: with: fetch-depth: 0 # Complete git history is required to generate the version from git tags. - - name: Setup Python 3.10 + - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install dependencies run: | sudo apt update sudo apt install -y yamllint - pipx install tox + python -m pip install --upgrade pip + # pin tox to the current major version to avoid + # workflows breaking all at once when a new major version is released. + python -m pip install 'tox<5' - name: Lint yaml files run: yamllint .yamllint snap/snapcraft.yaml @@ -68,19 +71,23 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Complete git history is required to generate the version from git tags. - name: Download the built snap uses: actions/download-artifact@v4 with: name: SNAP_FILE - - name: Setup Python 3.10 + - name: Set up Python 3.10 uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install dependencies - run: pipx install tox + run: | + python -m pip install --upgrade pip + python -m pip install 'tox<5' - - name: Run tests + - name: Run unit tests run: tox -e func