github.com/seachicken/gh-poi@v0.9.10/.github/workflows/ci-windows.yml (about)

     1  name: CI for Windows
     2  
     3  on:
     4    push:
     5      branches:
     6        - '*'
     7      tags:
     8        - ''
     9  
    10  jobs:
    11  
    12    build:
    13      runs-on: windows-latest
    14  
    15      steps:
    16      - name: Prepare git
    17        run: git config --global core.autocrlf false
    18  
    19      - uses: actions/checkout@v4
    20  
    21      - name: Set up Go
    22        uses: actions/setup-go@v5
    23        with:
    24          go-version-file: 'go.mod'
    25  
    26      - name: Build
    27        run: go build -v ./...
    28  
    29      - name: Checkout dummy repo
    30        uses: actions/checkout@v4
    31        with:
    32          repository: seachicken/can
    33          path: ci-test
    34          fetch-depth: 0
    35  
    36      - name: Test
    37        working-directory: ./ci-test
    38        run: |
    39          foreach ($branch in $(git branch --all | findstr /r '\<\s*remotes' | findstr /v /r 'main$')) {
    40            git branch --track $(echo $branch | Select-String -Pattern '.+/(.+$)' | %{$_.matches.groups[1].Value}) "$branch".trim()
    41          }
    42          echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
    43          go test $(go list ../... | grep -v /conn) -v
    44