github.com/mailgun/holster/v4@v4.20.0/.github/workflows/test.yaml (about)

     1  name: CI
     2  
     3  on:
     4    push:
     5      branches:
     6        - master
     7        - main
     8    pull_request:
     9      branches:
    10        - master
    11        - main
    12  
    13  jobs:
    14    test:
    15      name: test
    16      strategy:
    17        matrix:
    18          go-version:
    19            - 1.21.x # a minimum supported version(from go.mod)
    20            - 1.22.x
    21          os: [ ubuntu-latest ]
    22      runs-on: ${{ matrix.os }}
    23      steps:
    24        - name: Checkout
    25          uses: actions/checkout@v4
    26  
    27        - name: Set up Go
    28          uses: actions/setup-go@v5
    29          with:
    30            go-version: ${{ matrix.go-version }}
    31            cache: true # caching and restoring go modules and build outputs
    32  
    33        - run: go env
    34  
    35        - name: Install deps
    36          run: go mod download
    37  
    38        - name: Start containers
    39          run: docker-compose up -d --build
    40  
    41        - name: Test
    42          run: make test
    43  
    44        - name: Stop containers
    45          if: always()
    46          run: docker-compose down