diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..552ac8d --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,18 @@ +--- +name: Lint + +on: + pull_request: + branches: [ master ] + +jobs: + golangci: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.39 + only-new-issues: true \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..191353e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,44 @@ +--- +name: Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Unit tests + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.17.x' + - name: Build binary + run: go build + - name: Run tests + run: go test -v ./... + integration: + name: Integration tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.17.x' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install cram + run: pip install cram --user + - name: Check out code + uses: actions/checkout@v2 + - name: Build binary + run: go build + - name: Run tests + run: PATH=$PWD:$PATH cram -v tests/*.t \ No newline at end of file