...

Text file src/github.com/gin-contrib/sessions/.github/workflows/testing.yml

Documentation: github.com/gin-contrib/sessions/.github/workflows

     1name: Run Testing
     2on:
     3  push:
     4    branches:
     5      - master
     6  pull_request:
     7    branches:
     8      - master
     9
    10jobs:
    11  # Label of the container job
    12  runner-job:
    13    # You must use a Linux environment when using service containers or container jobs
    14    runs-on: ubuntu-latest
    15
    16    env:
    17      GO111MODULE: on
    18      GOPROXY: https://proxy.golang.org
    19    steps:
    20      - name: Start Redis
    21        uses: supercharge/redis-github-action@1.2.0
    22        with:
    23          redis-version: 4
    24
    25      - name: Start MongoDB 4.2
    26        uses: supercharge/mongodb-github-action@1.2.0
    27        with:
    28          mongodb-version: 4.2
    29
    30      - name: Start PostgreSQL 14
    31        uses: harmon758/postgresql-action@v1
    32        with:
    33          postgresql db: testdb
    34          postgresql user: testuser
    35          postgresql password: testpw
    36          postgresql version: '14'
    37
    38      - uses: niden/actions-memcached@v7
    39
    40      - name: Set up Go ${{ matrix.go }}
    41        uses: actions/setup-go@v2
    42
    43      - name: Checkout Code
    44        uses: actions/checkout@v3
    45        with:
    46          ref: ${{ github.ref }}
    47
    48      - name: Run Tests
    49        run: |
    50          go test -v -covermode=atomic -coverprofile=coverage.out ./...
    51
    52      - name: Upload coverage to Codecov
    53        uses: codecov/codecov-action@v1

View as plain text