Skip to content

Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 #292

Bump github.com/stretchr/testify from 1.10.0 to 1.11.0

Bump github.com/stretchr/testify from 1.10.0 to 1.11.0 #292

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GO_VERSION: '^1.23.5'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- name: Get dependencies
run: |
go mod download
go mod verify
- name: Run tests with coverage
run: |
go test ./... -v
go test -v -coverprofile=coverage.txt -covermode=atomic -json ./... >> report.json
- name: Run BDD tests explicitly
run: |
echo "Running core framework BDD tests..."
go test -v -run "TestApplicationLifecycle|TestConfigurationManagement" . || echo "Some core BDD tests may not be available"
- name: Verify BDD test coverage
run: |
chmod +x scripts/verify-bdd-tests.sh
./scripts/verify-bdd-tests.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: GoCodeAlone/modular
- name: CTRF Test Output
run: |
go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest
cat report.json | go-ctrf-json-reporter -o report.ctrf.json
if: always()
# https://github.com/ctrf-io/github-test-reporter
- name: Publish CTRF Test Summary Results
run: npx github-actions-ctrf report.ctrf.json
if: always()
test-cli:
name: Test CLI
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- name: Get dependencies
run: |
cd cmd/modcli
go mod download
go mod verify
- name: Run CLI tests with coverage
run: |
cd cmd/modcli
go test ./... -v -coverprofile=cli-coverage.txt -covermode=atomic -json >> cli-report.json
- name: Upload CLI coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: GoCodeAlone/modular
directory: cmd/modcli/
files: cli-coverage.txt
flags: cli
- name: CTRF Test Output for CLI
run: |
go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest
cd cmd/modcli
cat cli-report.json | go-ctrf-json-reporter -o cli-report.ctrf.json
if: always()
- name: Publish CLI CTRF Test Summary Results
run: |
cd cmd/modcli
npx github-actions-ctrf cli-report.ctrf.json
if: always()
# Dedicated BDD test job for comprehensive BDD test coverage
bdd-tests:
name: BDD Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- name: Get dependencies
run: |
go mod download
go mod verify
- name: Run Core Framework BDD tests
run: |
echo "=== Running Core Framework BDD Tests ==="
go test -v -run "TestApplicationLifecycle|TestConfigurationManagement" .
- name: Run Module BDD tests
run: |
echo "=== Running Module BDD Tests ==="
for module in modules/*/; do
if [ -f "$module/go.mod" ]; then
module_name=$(basename "$module")
echo "--- Testing BDD scenarios for $module_name ---"
cd "$module" && go test -v -run ".*BDD|.*Module" . && cd -
fi
done
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
# See: https://github.com/marketplace/actions/golangci-lint for configuration options
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
only-new-issues: true
args: -c .golangci.github.yml