Replace zalando/go-keyring with 99designs/keyring #43
Workflow file for this run
This file contains hidden or 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
| name: LSTK CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version-file: .tool-versions | |
| test-unit: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Run unit tests | |
| run: make test | |
| env: | |
| CREATE_JUNIT_REPORT: "true" | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: unit-test-results | |
| path: test-results.xml | |
| - name: Test report | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: Unit Test Results | |
| path: test-results.xml | |
| reporter: java-junit | |
| test-integration: | |
| name: Integration Tests (${{ matrix.os }}${{ matrix.keyring == true && ' with keyring' || matrix.keyring == false && ' without keyring' || '' }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| keyring: true | |
| - os: ubuntu-latest | |
| keyring: false | |
| - os: macos-latest | |
| keyring: true | |
| - os: windows-latest | |
| keyring: true | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: | | |
| go.sum | |
| test/integration/go.sum | |
| - name: Set up keyring (Ubuntu with keyring) | |
| if: matrix.os == 'ubuntu-latest' && matrix.keyring == true | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gnome-keyring dbus-x11 | |
| # Start a dbus session | |
| eval $(dbus-launch --sh-syntax) | |
| echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV | |
| # Unlock the keyring with a known password | |
| echo "test" | gnome-keyring-daemon --unlock --components=secrets | |
| # Give it a moment to start | |
| sleep 1 | |
| - name: Run integration tests | |
| run: make test-integration | |
| env: | |
| CREATE_JUNIT_REPORT: "true" | |
| LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: integration-test-results-${{ matrix.os }}${{ matrix.keyring == true && '-with-keyring' || matrix.keyring == false && '-file-backend' || '' }} | |
| path: test-integration-results.xml | |
| - name: Test report | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: Integration Test Results (${{ matrix.os }}${{ matrix.keyring == true && ' with keyring' || matrix.keyring == false && ' without keyring' || '' }}) | |
| path: test-integration-results.xml | |
| reporter: java-junit |