Fix notifuse full case #110
Workflow file for this run
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: Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.22', '1.23', '1.24.4'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run tests | |
| run: go test -v ./... | |
| - name: Run integration tests | |
| run: go test -v ./mjml -run TestMJMLAgainstExpected | |
| - name: Check test coverage | |
| run: go test -coverprofile=coverage.txt ./... | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| # TODO: Enable linting once codebase is cleaned up | |
| # lint: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Set up Go | |
| # uses: actions/setup-go@v4 | |
| # with: | |
| # go-version: '1.24.4' | |
| # | |
| # - name: Run golangci-lint | |
| # uses: golangci/golangci-lint-action@v3 | |
| # with: | |
| # version: latest | |
| # args: --timeout=5m | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.4' | |
| - name: Build CLI | |
| run: go build -o bin/gomjml ./cmd/gomjml | |
| - name: Test CLI basic functionality | |
| run: | | |
| echo '<mjml><mj-body><mj-section><mj-column><mj-text>Test</mj-text></mj-column></mj-section></mj-body></mjml>' > test.mjml | |
| ./bin/gomjml compile test.mjml -o test.html | |
| grep -q "Test" test.html | |
| echo "✓ CLI basic functionality works" | |
| race: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.4' | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run race tests on cache-sensitive packages | |
| run: go test -race -v ./mjml -run "Cache|Concurrent" | |
| - name: Run race tests on all packages | |
| run: go test -race -timeout=10m ./... |