Repository navigation
Add json marshal syntax fallback #137
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: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Check formatting | |
| run: | | |
| if [ -n "$(gofmt -l ./go)" ]; then | |
| echo "Please run 'gofmt -w ./go'" | |
| gofmt -d ./go | |
| exit 1 | |
| fi | |
| - name: Run go vet | |
| run: | | |
| # Vet main package only, skip tests directory | |
| # (Don't lint test files since we want to support any valid Go code) | |
| go vet ./go | |
| - name: Build | |
| run: go build -o go2rust ./go | |
| - name: Setup BATS | |
| uses: bats-core/[email protected] | |
| - name: Run tests | |
| run: ./test.sh -v -t 30s | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [ -n "$(git diff --name-only)" ]; then | |
| echo "ERROR: Tests modified tracked files!" | |
| echo "Files changed:" | |
| git diff --name-only | |
| echo "" | |
| echo "Diff content:" | |
| git diff | |
| echo "" | |
| echo "This usually means:" | |
| echo "1. XFAIL tests were auto-promoted (moved from tests/XFAIL/ to tests/)" | |
| echo "2. Generated .rs files were modified" | |
| echo "3. tests.bats was modified with new auto-generated tests" | |
| echo "" | |
| echo "Please run tests locally and commit the changes if they are correct." | |
| exit 1 | |
| fi |