pam: start tests #1848
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: test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| test_go: | |
| name: Test (go) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - macos-15 | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| - windows-2025 | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| - run: | | |
| make test-go | |
| - uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| if: ${{ always() }} | |
| with: | |
| paths: ${{ github.workspace }}/junit.xml | |
| show: "fail" | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-${{ matrix.platform }} | |
| files: ${{ github.workspace }}/coverage.txt | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-${{ matrix.platform }} | |
| files: ${{ github.workspace }}/junit.xml | |
| report_type: test_results | |
| lint_go: | |
| name: Lint (go) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Install libraries | |
| run: sudo apt-get update && sudo apt-get install -y libpam0g-dev libudev-dev | |
| - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v8 | |
| with: | |
| args: --timeout 5000s | |
| test_rs: | |
| name: Test (rust) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpam0g-dev libudev-dev | |
| - name: Setup rust dependencies | |
| uses: taiki-e/install-action@80a23c5ba9e1100fd8b777106e810018ed662a7b # v2 | |
| with: | |
| tool: cargo-llvm-cov nextest | |
| - run: make test-rs | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-${{ matrix.platform }} | |
| files: ${{ github.workspace }}/coverage-rs.txt | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-${{ matrix.platform }} | |
| files: ${{ github.workspace }}/coverage-rs.txt | |
| report_type: test_results | |
| lint_rs: | |
| name: Lint (rust) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpam0g-dev libudev-dev | |
| - run: make lint-rs | |
| lint_js: | |
| name: Lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - browser-ext | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| with: | |
| node-version-file: "${{ matrix.target }}/package.json" | |
| cache: "npm" | |
| cache-dependency-path: "${{ matrix.target }}/package-lock.json" | |
| - run: make ${{ matrix.target }}/lint | |
| lint_cpp: | |
| name: Lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - ee/wcp | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - run: make ${{ matrix.target }}/lint | |
| test_go_int: | |
| name: Test (integration) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| - uses: goauthentik/action-setup-authentik@9640994d98397fb40b525e6795c29d407ad201fa # v2.0 | |
| id: setup | |
| with: | |
| version: beta | |
| sentry_env: goauthentik-platform-ci | |
| blueprints_path: ./hack/authentik/blueprints | |
| wait: true | |
| - env: | |
| AK_TOKEN: ${{ steps.setup.outputs.admin_token }} | |
| AK_URL: ${{ steps.setup.outputs.http_url }} | |
| run: | | |
| ./hack/authentik/wait.sh | |
| - run: | | |
| make test-integration | |
| - uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| if: ${{ always() }} | |
| with: | |
| paths: ${{ github.workspace }}/junit.xml | |
| show: "fail" | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-integration | |
| files: ${{ github.workspace }}/coverage.txt | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-integration | |
| files: ${{ github.workspace }}/junit.xml | |
| report_type: test_results | |
| test_go_e2e: | |
| name: Test (e2e) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5 | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libpam0g-dev libudev-dev | |
| - uses: goauthentik/action-setup-authentik@9640994d98397fb40b525e6795c29d407ad201fa # v2.0 | |
| id: setup | |
| with: | |
| version: beta | |
| sentry_env: goauthentik-platform-ci | |
| blueprints_path: ./hack/authentik/blueprints | |
| wait: true | |
| - env: | |
| AK_TOKEN: ${{ steps.setup.outputs.admin_token }} | |
| AK_URL: ${{ steps.setup.outputs.http_url }} | |
| run: | | |
| ./hack/authentik/wait.sh | |
| - env: | |
| AK_PASSWORD: ${{ steps.setup.outputs.admin_password }} | |
| run: | | |
| make test-e2e | |
| - uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2 | |
| if: ${{ always() }} | |
| with: | |
| paths: ${{ github.workspace }}/junit.xml | |
| show: "fail" | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-e2e | |
| files: ${{ github.workspace }}/coverage.txt | |
| - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v5 | |
| if: ${{ always() }} | |
| with: | |
| use_oidc: true | |
| flags: go-e2e | |
| files: ${{ github.workspace }}/junit.xml | |
| report_type: test_results |