Improve wcurl version comparison mechanism #150
Workflow file for this run
This file contains hidden or 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
| # wcurl - a simple wrapper around curl to easily download files. | |
| # | |
| # This is wcurl's test pipeline. | |
| # | |
| # Copyright (C) Samuel Henrique <[email protected]>, Sergio Durigan | |
| # Junior <[email protected]> and many contributors, see the AUTHORS | |
| # file. | |
| # | |
| # Permission to use, copy, modify, and distribute this software for any purpose | |
| # with or without fee is hereby granted, provided that the above copyright | |
| # notice and this permission notice appear in all copies. | |
| # | |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN | |
| # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | |
| # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | |
| # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE | |
| # OR OTHER DEALINGS IN THE SOFTWARE. | |
| # | |
| # Except as contained in this notice, the name of a copyright holder shall not be | |
| # used in advertising or otherwise to promote the sale, use or other dealings in | |
| # this Software without prior written authorization of the copyright holder. | |
| # | |
| # SPDX-License-Identifier: curl | |
| --- | |
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| lint: | |
| name: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Install tools | |
| run: | | |
| /home/linuxbrew/.linuxbrew/bin/brew install zizmor shellcheck checkbashisms shfmt typos-cli | |
| python3 -m venv ~/venv | |
| ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary \ | |
| -r .github/workflows/requirements.txt | |
| - name: 'REUSE check' | |
| run: | | |
| source ~/venv/bin/activate | |
| reuse lint | |
| - name: Run zizmor | |
| env: | |
| GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| zizmor --pedantic .github/workflows/*.yml .github/dependabot.yml | |
| - name: Run shellcheck | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| shellcheck --version | |
| git grep -z -l '^#!/bin/sh' | xargs -0 -r shellcheck -- | |
| - name: Run checkbashisms | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| checkbashisms --version | |
| git grep -z -l '^#!/bin/sh' | xargs -0 -r checkbashisms -- | |
| - name: Run shfmt | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| shfmt --version | |
| shfmt --func-next-line --space-redirects --case-indent --binary-next-line --indent 4 --posix --diff . | |
| - name: Run codespell | |
| run: | | |
| source ~/venv/bin/activate | |
| codespell --version | |
| codespell | |
| - name: Run typos | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| typos --version | |
| typos | |
| debian: | |
| name: debian | |
| runs-on: ubuntu-latest | |
| container: | |
| image: debian:stable # zizmor: ignore[unpinned-images] | |
| steps: | |
| - name: Install curl and shunit2 | |
| run: | | |
| apt-get -o Dpkg::Use-Pty=0 update | |
| apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends curl shunit2 | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Run shunit2 tests | |
| run: ./tests/tests.sh | |
| fedora: | |
| name: fedora | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:latest # zizmor: ignore[unpinned-images] | |
| steps: | |
| - name: Install git and shunit2 | |
| run: | | |
| dnf install -y git | |
| git clone \ | |
| --depth 1 --branch v2.1.8 \ | |
| https://github.com/kward/shunit2.git | |
| cd shunit2 | |
| cp shunit2 /usr/local/bin/shunit2 | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Run shunit2 tests | |
| run: ./tests/tests.sh | |
| macos: | |
| name: macos | |
| runs-on: macos-latest | |
| steps: | |
| - name: Install shunit2 | |
| run: HOMEBREW_NO_AUTO_UPDATE=1 brew install shunit2 | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Run shunit2 tests | |
| run: ./tests/tests.sh |