|
1 | | -name: CI |
| 1 | +name: LSTK CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
9 | 9 |
|
10 | 10 | permissions: |
11 | 11 | contents: read |
| 12 | + pull-requests: write |
| 13 | + checks: write |
12 | 14 |
|
13 | 15 | jobs: |
14 | 16 | lint: |
|
27 | 29 | uses: golangci/golangci-lint-action@v9 |
28 | 30 | with: |
29 | 31 | version-file: .tool-versions |
| 32 | + |
| 33 | + test-unit: |
| 34 | + name: Unit Tests |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - name: Checkout code |
| 38 | + uses: actions/checkout@v6 |
| 39 | + |
| 40 | + - name: Set up Go |
| 41 | + uses: actions/setup-go@v6 |
| 42 | + with: |
| 43 | + go-version-file: go.mod |
| 44 | + cache-dependency-path: go.sum |
| 45 | + |
| 46 | + - name: Run unit tests |
| 47 | + run: make test |
| 48 | + env: |
| 49 | + CREATE_JUNIT_REPORT: "true" |
| 50 | + |
| 51 | + - name: Upload test results |
| 52 | + uses: actions/upload-artifact@v4 |
| 53 | + if: always() |
| 54 | + with: |
| 55 | + name: unit-test-results |
| 56 | + path: test-results.xml |
| 57 | + |
| 58 | + - name: Test report |
| 59 | + uses: dorny/test-reporter@v1 |
| 60 | + if: always() |
| 61 | + with: |
| 62 | + name: Unit Test Results |
| 63 | + path: test-results.xml |
| 64 | + reporter: java-junit |
| 65 | + |
| 66 | + test-integration: |
| 67 | + name: Integration Tests (${{ matrix.os }}) |
| 68 | + runs-on: ${{ matrix.os }} |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 73 | + steps: |
| 74 | + - name: Checkout code |
| 75 | + uses: actions/checkout@v6 |
| 76 | + |
| 77 | + - name: Set up Go |
| 78 | + uses: actions/setup-go@v6 |
| 79 | + with: |
| 80 | + go-version-file: go.mod |
| 81 | + cache-dependency-path: | |
| 82 | + go.sum |
| 83 | + test/integration/go.sum |
| 84 | +
|
| 85 | + - name: Run integration tests |
| 86 | + run: make test-integration |
| 87 | + env: |
| 88 | + CREATE_JUNIT_REPORT: "true" |
| 89 | + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} |
| 90 | + |
| 91 | + - name: Upload test results |
| 92 | + uses: actions/upload-artifact@v4 |
| 93 | + if: always() |
| 94 | + with: |
| 95 | + name: integration-test-results-${{ matrix.os }} |
| 96 | + path: test-integration-results.xml |
| 97 | + |
| 98 | + - name: Test report |
| 99 | + uses: dorny/test-reporter@v1 |
| 100 | + if: always() |
| 101 | + with: |
| 102 | + name: Integration Test Results (${{ matrix.os }}) |
| 103 | + path: test-integration-results.xml |
| 104 | + reporter: java-junit |
0 commit comments