diff --git a/.gitea/workflows/job_lint.yml b/.gitea/workflows/job_lint.yml index acfc4ed7..d97e7477 100644 --- a/.gitea/workflows/job_lint.yml +++ b/.gitea/workflows/job_lint.yml @@ -12,17 +12,18 @@ jobs: lint: runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout code uses: actions/checkout@v4 with: filter: 'blob:none' - - name: setup-go + - name: setup go uses: actions/setup-go@v5 with: + cache-dependency-path: "**/*.sum" go-version: 'stable' - - name: deps - run: go get -v -d ./... - - name: lint + - name: setup deps + run: go get -v ./... + - name: run lint uses: https://github.com/golangci/golangci-lint-action@v6 with: version: 'latest' diff --git a/.gitea/workflows/job_test.yml b/.gitea/workflows/job_test.yml index 0840a4fe..f68cbca4 100644 --- a/.gitea/workflows/job_test.yml +++ b/.gitea/workflows/job_test.yml @@ -17,17 +17,18 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: checkout + - name: checkout code uses: actions/checkout@v4 with: filter: 'blob:none' - - name: setup-go + - name: setup go uses: actions/setup-go@v5 with: + cache-dependency-path: "**/*.sum" go-version: 'stable' - - name: deps - run: go get -v -d ./... - - name: test + - name: setup deps + run: go get -v ./... + - name: run test env: INTEGRATION_TESTS: yes run: go test -mod readonly -v ./... diff --git a/.gitea/workflows/job_tests.yml b/.gitea/workflows/job_tests.yml new file mode 100644 index 00000000..e8984f1a --- /dev/null +++ b/.gitea/workflows/job_tests.yml @@ -0,0 +1,53 @@ +name: test + +on: + pull_request: + types: [opened, reopened, synchronize] + branches: + - master + - v3 + - v4 + push: + branches: + - master + - v3 + - v4 + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v4 + with: + filter: 'blob:none' + - name: checkout tests + uses: actions/checkout@v4 + with: + ref: master + filter: 'blob:none' + repository: unistack-org/micro-tests + path: micro-tests + - name: setup go + uses: actions/setup-go@v5 + with: + cache-dependency-path: "**/*.sum" + go-version: 'stable' + - name: setup go work + env: + GOWORK: /workspace/${{ github.repository_owner }}/go.work + run: | + go work init + go work use . + go work use micro-tests + - name: setup deps + env: + GOWORK: /workspace/${{ github.repository_owner }}/go.work + run: go get -v ./... + - name: run tests + env: + INTEGRATION_TESTS: yes + GOWORK: /workspace/${{ github.repository_owner }}/go.work + run: | + cd micro-tests + go test -mod readonly -v ./... || true