github.com/aretext/aretext@v1.3.0/.github/workflows/test.yml (about)

     1  name: tests
     2  
     3  on:
     4    push:
     5      branches: [ main ]
     6    pull_request:
     7      branches: [ main ]
     8  
     9  jobs:
    10    build:
    11      strategy:
    12        matrix:
    13          os:
    14            - "ubuntu-latest"
    15            - "macos-latest"
    16      runs-on: ${{ matrix.os }}
    17  
    18      steps:
    19      - uses: actions/checkout@v4
    20  
    21      - name: Set up Go
    22        uses: actions/setup-go@v5
    23        with:
    24          go-version: stable
    25  
    26      - name: Install dev tools
    27        run: make install-devtools
    28  
    29      - name: Build and run tests
    30        run: make
    31  
    32      - name: Verify all changes committed (autoformat / generated code)
    33        run: |
    34          DIFF=$(git diff --numstat -- ':!go\.*')
    35          if [[ -n "$DIFF" ]]; then
    36              echo "Uncommitted changes detected:";
    37              echo "$DIFF";
    38              echo "To resolve, please run these commands:"
    39              echo "    make && git add . && git commit"
    40              exit 1;
    41          fi