name: Test
on:
- pull_request

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Go 1.18
        uses: actions/setup-go@v3
        with:
          go-version: 1.18

      - name: Check out code
        uses: actions/checkout@v3
      - name: Install Memcached
        run: sudo apt-get install -y memcached
      - name: Run Tests
        run: go test -v -race ./...

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Set up Go 1.18
        uses: actions/setup-go@v3
        with:
          go-version: 1.18

      - name: Check out code
        uses: actions/checkout@v3

      - name: Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.45.2
