fix(ci): enable CGO tests with build cache for gotk4
- commit
- a35624f100d2098d19165eb0d544f40a07364e5e
- author
- bnema · · 2025-11-30 05:00 UTC
- parent
- abce795
- signature
- unsigned
1 file · +20 -2
M .github/workflows/ci.yml +20 -2
| @@ -17,6 +17,13 @@ jobs: | |||
| 17 | 17 | with: | |
| 18 | 18 | go-version: stable | |
| 19 | 19 | cache: true | |
| 20 | + | - name: Cache Go build cache | |
| 21 | + | uses: actions/cache@v4 | |
| 22 | + | with: | |
| 23 | + | path: ~/.cache/go-build | |
| 24 | + | key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
| 25 | + | restore-keys: | | |
| 26 | + | ${{ runner.os }}-go-build- | |
| 20 | 27 | - uses: actions/setup-node@v6 | |
| 21 | 28 | with: | |
| 22 | 29 | node-version: '24' | |
| @@ -41,10 +48,21 @@ jobs: | |||
| 41 | 48 | with: | |
| 42 | 49 | go-version: stable | |
| 43 | 50 | cache: true | |
| 51 | + | - name: Cache Go build cache | |
| 52 | + | uses: actions/cache@v4 | |
| 53 | + | with: | |
| 54 | + | path: ~/.cache/go-build | |
| 55 | + | key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
| 56 | + | restore-keys: | | |
| 57 | + | ${{ runner.os }}-go-build- | |
| 44 | 58 | - uses: actions/setup-node@v6 | |
| 45 | 59 | with: | |
| 46 | 60 | node-version: '24' | |
| 61 | + | - name: Install WebKitGTK 6.0 dependencies | |
| 62 | + | run: | | |
| 63 | + | sudo apt-get update | |
| 64 | + | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev libgirepository1.0-dev | |
| 47 | 65 | - name: Build frontend assets | |
| 48 | 66 | run: make build-frontend | |
| 49 | - | - name: Run tests (non-CGO packages only) | |
| 50 | - | run: CGO_ENABLED=0 go test -v ./... | |
| 67 | + | - name: Run tests | |
| 68 | + | run: go test -v ./... | |
| @@ -17,6 +17,13 @@ jobs: | |||||
| 17 | with: | 17 | with: | ||
| 18 | go-version: stable | 18 | go-version: stable | ||
| 19 | cache: true | 19 | cache: true | ||
| 20 | + | - name: Cache Go build cache | |||
| 21 | + | uses: actions/cache@v4 | |||
| 22 | + | with: | |||
| 23 | + | path: ~/.cache/go-build | |||
| 24 | + | key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |||
| 25 | + | restore-keys: | | |||
| 26 | + | ${{ runner.os }}-go-build- | |||
| 20 | - uses: actions/setup-node@v6 | 27 | - uses: actions/setup-node@v6 | ||
| 21 | with: | 28 | with: | ||
| 22 | node-version: '24' | 29 | node-version: '24' | ||
| @@ -41,10 +48,21 @@ jobs: | |||||
| 41 | with: | 48 | with: | ||
| 42 | go-version: stable | 49 | go-version: stable | ||
| 43 | cache: true | 50 | cache: true | ||
| 51 | + | - name: Cache Go build cache | |||
| 52 | + | uses: actions/cache@v4 | |||
| 53 | + | with: | |||
| 54 | + | path: ~/.cache/go-build | |||
| 55 | + | key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |||
| 56 | + | restore-keys: | | |||
| 57 | + | ${{ runner.os }}-go-build- | |||
| 44 | - uses: actions/setup-node@v6 | 58 | - uses: actions/setup-node@v6 | ||
| 45 | with: | 59 | with: | ||
| 46 | node-version: '24' | 60 | node-version: '24' | ||
| 61 | + | - name: Install WebKitGTK 6.0 dependencies | |||
| 62 | + | run: | | |||
| 63 | + | sudo apt-get update | |||
| 64 | + | sudo apt-get install -y libwebkitgtk-6.0-dev libgtk-4-dev libgirepository1.0-dev | |||
| 47 | - name: Build frontend assets | 65 | - name: Build frontend assets | ||
| 48 | run: make build-frontend | 66 | run: make build-frontend | ||
| 49 | - | - name: Run tests (non-CGO packages only) | 67 | + | - name: Run tests |
| 50 | - | run: CGO_ENABLED=0 go test -v ./... | 68 | + | run: go test -v ./... |