Skip to content

cmd/atlas: allow attaching config token to context (#2079) #1

cmd/atlas: allow attaching config token to context (#2079)

cmd/atlas: allow attaching config token to context (#2079) #1

Workflow file for this run

# # # # # # # # # # # # # # # #
# CODE GENERATED - DO NOT EDIT
# # # # # # # # # # # # # # # #
name: CI - General - Community Edition
on:
pull_request:
paths-ignore:
- 'doc/**'
push:
branches:
- master
paths-ignore:
- 'doc/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21
- uses: actions/checkout@v2
- name: Run linters
uses: golangci/golangci-lint-action@v3
with:
args: --verbose
generate-cmp:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version-file: cmd/atlas/go.mod
- name: Install stringer
run: go install golang.org/x/tools/cmd/stringer@latest
- name: run "go generate ./..."
run: go generate ./...
- name: go generate cmd/atlas
working-directory: cmd/atlas
run: go generate ./...
- name: Verify generated files are checked-in properly
run: |
status=$(git status --porcelain | grep -v "go.\(sum\|mod\)" | cat)
if [ -n "$status" ]; then
echo "you need to run 'go generate ./...' and commit the changes"
echo "$status"
exit 1
fi
unit:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.20', '1.21' ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Run sql tests
run: go test -race ./...
working-directory: sql
- name: Run schemahcl tests
run: go test -race ./...
working-directory: schemahcl
cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v4
with:
go-version-file: cmd/atlas/go.mod
- name: Run cli tests
run: go test -race ./...
working-directory: cmd/atlas
integration:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version-file: cmd/atlas/go.mod
- name: Run integration tests for HCL
working-directory: internal/integration/hclsqlspec
run: go test -race -count=2 -v ./...