diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e931115..f83aacc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,12 +7,12 @@ jobs: bats-test: strategy: matrix: - os: [ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11] + os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-11] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install greadlink if: startsWith(runner.os, 'macOS') run: brew install coreutils @@ -20,26 +20,30 @@ jobs: if: startsWith(runner.os, 'macOS') run: brew install parallel - name: Test code - shell: 'script -q -e -c "bash {0}"' run: test/run lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.17 + go-version: 1.21.0 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.8 - name: Install shfmt - run: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt + run: go install mvdan.cc/sh/v3/cmd/shfmt@latest - name: Install shellcheck - run: brew install shellcheck + env: + scversion: stable # Or latest, vxx, etc + run: | + wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv "shellcheck-${scversion}/shellcheck" + sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/ + shellcheck --version - name: Install pre-commit run: python3 -m pip install pre-commit - name: Run lint