Fix GeoIP batch retry handling #43
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Lint & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| working-directory: web | |
| - name: Lint frontend | |
| run: npm run lint | |
| working-directory: web | |
| - name: Build frontend | |
| run: npm run build | |
| working-directory: web | |
| - name: Copy frontend into embed directory | |
| run: cp -r web/dist cmd/opensnitch-web/frontend | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.22" | |
| cache: true | |
| - name: Run Go tests | |
| run: CGO_ENABLED=1 go test ./... | |
| build: | |
| name: Build Binary | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.22" | |
| cache: true | |
| - name: Install frontend dependencies | |
| run: npm ci | |
| working-directory: web | |
| - name: Build binary | |
| run: make build | |
| - name: Verify binary | |
| run: test -f bin/opensnitch-web | |
| docker: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build Docker image | |
| run: docker build -t opensnitch-web:ci . | |
| screenshots: | |
| name: Generate Screenshots | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: web | |
| - name: Install Playwright | |
| run: npx playwright install chromium --with-deps | |
| working-directory: web | |
| - name: Generate screenshots | |
| run: npm run screenshots | |
| working-directory: web | |
| - name: Upload screenshots | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: screenshots | |
| path: assets/screenshots/ |