name: Lama2 Tests
on: [push]



jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: '1.19.x'
      - name: Install dependencies
        run: go mod tidy
      - name: Build
        run: go build -tags=cli -v ./...
      - name: Test with the Go CLI
        run: |
          go mod tidy
          go build -tags=cli -o build/l2 -ldflags "-X main.version=`git tag --sort=-version:refname | head -n 1`" l2.go
          go test -tags=cli -v ./tests/
      - name: Deploy hexmos doc
        run: curl -X POST --fail -F token=${{ secrets.TRIGGER_TOKEN }} -F ref=main https://git.apps.hexmos.com/api/v4/projects/85/trigger/pipeline