-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed wrong http method for ListItemConnections - Add public list artifact jobs API - Include schema name for table maintenance for schema enabled lakehouse - add ci for tests
- Loading branch information
1 parent
fd72e60
commit b5b41e6
Showing
18 changed files
with
686 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
|
||
--- | ||
name: 🧪 Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- synchronize | ||
schedule: | ||
- cron: "0 2 * * *" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ format('{0}-{1}-{2}-{3}-{4}', github.workflow, github.event_name, github.ref, github.base_ref || null, github.head_ref || null) }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
checks: write | ||
|
||
jobs: | ||
test: | ||
name: 🧪 Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⤵️ Checkout | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
|
||
- name: 🚧 Setup Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
|
||
- name: 🚧 Setup Task | ||
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0 | ||
with: | ||
repo-token: ${{ github.token }} | ||
|
||
- name: 🔨 Setup Test tools | ||
run: task test:tools | ||
|
||
- name: 🧪 Run fake tests | ||
run: task test | ||
|
||
- name: 📢 Publish test results | ||
if: always() | ||
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5 # v1.9.1 | ||
with: | ||
name: 📜 Test results | ||
reporter: jest-junit | ||
path: testresults.xml | ||
|
||
- name: ⚙️ Get Coverage summary | ||
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 | ||
with: | ||
filename: coverage.xml | ||
badge: true | ||
fail_below_min: false | ||
format: markdown | ||
hide_branch_rate: false | ||
hide_complexity: false | ||
indicators: true | ||
output: both | ||
thresholds: "40 60" | ||
|
||
- name: 📢 Publish coverage results | ||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: 📤 Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
with: | ||
name: test-results | ||
path: testresults.xml | ||
if-no-files-found: warn | ||
overwrite: true | ||
|
||
- name: 📤 Upload coverage results | ||
if: always() | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | ||
with: | ||
name: test-coverage-results | ||
path: | | ||
coverage.html | ||
coverage.json | ||
coverage.out | ||
coverage.txt | ||
coverage.xml | ||
code-coverage-results.md | ||
if-no-files-found: warn | ||
overwrite: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# yaml-language-server: $schema=https://taskfile.dev/schema.json | ||
# docs: https://taskfile.dev | ||
# | ||
# Windows: | ||
# winget install Task.Task | ||
# | ||
# Linux: | ||
# sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin | ||
# echo 'command -v task >/dev/null || export PATH="$PATH:$HOME/.local/bin"' >> ~/.profile | ||
# source ~/.profile | ||
# | ||
# macOS: | ||
# brew install go-task/tap/go-task | ||
--- | ||
version: "3" | ||
|
||
vars: | ||
PWSH: pwsh -NonInteractive -NoProfile -NoLogo -Command | ||
|
||
tasks: | ||
test: | ||
desc: Run tests | ||
cmds: | ||
- go clean -testcache | ||
- '{{if eq .GITHUB_ACTIONS "true"}}gotestsum --format-hivis --format github-actions --junitfile "testresults.xml" -- ./... -p 4 -timeout 10m -coverprofile="coverage.out" -covermode atomic{{end}}' | ||
- '{{if ne .GITHUB_ACTIONS "true"}}gotestsum --format-hivis --format pkgname-and-test-fails --junitfile "testresults.xml" -- ./... -p 4 -timeout 10m -coverprofile="coverage.out" -covermode atomic{{end}}' | ||
- task: test:getcover | ||
|
||
test:getcover: | ||
desc: Get test coverage results | ||
internal: true | ||
cmds: | ||
- gocov convert coverage.out > coverage.json | ||
- gocov report coverage.json > coverage.txt | ||
- cmd: | | ||
{{ .PWSH }} 'Get-Content coverage.json | gocov-xml > coverage.xml' | ||
platforms: [windows] | ||
- cmd: gocov-xml < coverage.json > coverage.xml | ||
platforms: [linux, darwin] | ||
- go tool cover -html coverage.out -o coverage.html | ||
|
||
test:tools: | ||
desc: Install Test Tools | ||
dir: "{{.goSdkOutput}}" | ||
cmds: | ||
- for: [gotestsum, gocov, gocov-xml] | ||
task: install:{{.ITEM}} | ||
|
||
install:gotestsum: | ||
desc: Install GoTestSum | ||
cmds: | ||
- go install gotest.tools/gotestsum@latest | ||
|
||
install:gocov: | ||
desc: Install gocov | ||
cmds: | ||
- go install github.com/axw/gocov/gocov@latest | ||
|
||
install:gocov-xml: | ||
desc: Install gocov-xml | ||
cmds: | ||
- go install github.com/AlekSi/gocov-xml@latest |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.