name: Test on: push: branches: [main] paths-ignore: - "website/**" - "README.md" - "CHANGELOG.md" pull_request: branches: [main] paths-ignore: - "website/**" - "README.md" - "CHANGELOG.md" schedule: - cron: "0 3 * * *" workflow_dispatch: workflow_call: jobs: unit-test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Check AI context routes run: python3 scripts/ai-context.py check - name: Set up Go uses: actions/setup-go@v5 with: go-version: "1.23" - name: Build run: make build - name: Unit Tests run: go test -v -race ./internal/... integration-test: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: "1.23" - name: Build Binary run: make build - name: Integration Tests run: go test -v -race ./tests/integration/... env: SKILLSHARE_TEST_BINARY: ${{ github.workspace }}/bin/skillshare docker-sandbox-offline: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Docker Sandbox Tests (Offline) run: ./scripts/test_docker.sh docker-sandbox-online: runs-on: ubuntu-latest if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository steps: - name: Checkout uses: actions/checkout@v4 - name: Docker Sandbox Tests (Online) run: ./scripts/test_docker_online.sh redteam: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: "1.23" - name: Red Team Test run: make test-redteam redteam-signal: runs-on: ubuntu-latest if: github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: "1.23" - name: Red Team Signal (Code Mutation) run: make test-redteam-signal - name: Red Team Signal (Rules Disable) run: make test-redteam-rules-signal