Repository navigation
chore(deps): update all non-major dependencies (#2007) #899
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
| name: Unit Tests | |
| on: | |
| push: | |
| branches-ignore: | |
| - weblate | |
| paths: | |
| - "**/*.go" | |
| - go.mod | |
| - go.sum | |
| - install.sh | |
| - tests/install_openwrt_test.sh | |
| - resources/services/nginx-ui.openwrt | |
| - resources/keep.openwrt | |
| - "packaging/openwrt/**" | |
| - ".github/workflows/build.yml" | |
| - ".github/workflows/unit-test.yml" | |
| - ".github/scripts/**" | |
| pull_request: | |
| paths: | |
| - "**/*.go" | |
| - go.mod | |
| - go.sum | |
| - install.sh | |
| - tests/install_openwrt_test.sh | |
| - resources/services/nginx-ui.openwrt | |
| - resources/keep.openwrt | |
| - "packaging/openwrt/**" | |
| - ".github/workflows/build.yml" | |
| - ".github/workflows/unit-test.yml" | |
| - ".github/scripts/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Download Go modules | |
| run: bash .github/scripts/retry.sh -- go mod download | |
| - name: Run unit tests | |
| run: >- | |
| go test -tags=unembed -race -cover -count=1 ./... | |
| windows-terminal: | |
| name: Windows terminal (${{ matrix.os }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022, windows-2025] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| env: | |
| GOWORK: "off" | |
| CGO_ENABLED: "1" | |
| CC: gcc | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version-file: go.mod | |
| - name: Download Go modules | |
| shell: bash | |
| run: bash .github/scripts/retry.sh -- go mod download | |
| - name: Set up C compiler for the race detector | |
| uses: msys2/setup-msys2@ec48f7c5447b3140e2b088413ae3a55687bccb6e # v2 | |
| with: | |
| msystem: UCRT64 | |
| install: mingw-w64-ucrt-x86_64-gcc | |
| path-type: inherit | |
| - name: Test native Windows terminals | |
| shell: msys2 {0} | |
| env: | |
| PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| EVENT_SHA: ${{ github.sha }} | |
| run: | | |
| set -o pipefail | |
| { | |
| printf 'Checked out SHA: %s\nPR base SHA: %s\nPR head SHA: %s\nEvent SHA: %s\n' "$(git rev-parse HEAD)" "$PR_BASE_SHA" "$PR_HEAD_SHA" "$EVENT_SHA" | |
| go test -tags=unembed -race -cover -count=3 -timeout=10m -v ./settings ./api/terminal ./internal/pty | |
| } 2>&1 | tee windows-terminal.log | |
| - name: Preserve native terminal test logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: terminal-${{ matrix.os }}-${{ github.event.pull_request.head.sha || github.sha }} | |
| path: windows-terminal.log | |
| if-no-files-found: warn | |
| openwrt-install: | |
| name: OpenWrt installer | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - name: Test installer detection and paths | |
| run: bash tests/install_openwrt_test.sh | |
| - name: Verify OpenWrt SDK mirror | |
| env: | |
| OPENWRT_VERSION: 25.12.5 | |
| run: | | |
| set -euo pipefail | |
| targets=( | |
| x86/64 | |
| armsr/armv8 | |
| mediatek/filogic | |
| armsr/armv7 | |
| ipq40xx/generic | |
| sifiveu/generic | |
| ) | |
| checksum_file="$(mktemp)" | |
| trap 'rm -f "$checksum_file"' EXIT | |
| for target in "${targets[@]}"; do | |
| base_url="https://mirror-03.infra.openwrt.org/releases/${OPENWRT_VERSION}/targets/${target}" | |
| curl --retry 3 --retry-all-errors --retry-delay 2 \ | |
| -fsSLo "$checksum_file" "${base_url}/sha256sums" | |
| sdk_filename="$(awk '$2 ~ /^\*?openwrt-sdk-.*\.Linux-x86_64\.tar\.zst$/ {sub(/^\*/, "", $2); print $2; exit}' "$checksum_file")" | |
| test -n "$sdk_filename" | |
| curl --retry 3 --retry-all-errors --retry-delay 2 \ | |
| -fsSILo /dev/null "${base_url}/${sdk_filename}" | |
| done |