Use TSP composite action in CI #355
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: Tenant Security Client Java CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: set up jdk 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: adopt | |
| - name: cache mvn repository | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: test | |
| run: test-suites/unitTest.sh | |
| - name: local install | |
| run: mvn install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true -B -V | |
| - name: cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| - name: Save TSP env.integration to a file | |
| run: | | |
| cat > .env.integration <<EOF | |
| ${{ secrets.TSP_ENV_INTEGRATION }} | |
| EOF | |
| - name: Start the TSP | |
| uses: IronCoreLabs/workflows/.github/actions/start-tsp@start-tsp-v1 | |
| with: | |
| gcloud-auth: ${{ secrets.GCLOUD_AUTH }} | |
| env-file-path: .env.integration | |
| - name: integration test | |
| run: env $(cat .env.integration) ./test-suites/integrationTest.sh | |
| build_examples: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example-dir: | |
| [large-documents, logging-example, rekey-example, simple-roundtrip] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: set up jdk 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: adopt | |
| - name: cache mvn repository | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Build example | |
| run: mvn compile | |
| working-directory: ./examples/${{ matrix.example-dir }} | |
| formatter: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: set up jdk 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 17 | |
| distribution: adopt | |
| - name: Check formatting | |
| run: mvn formatter:validate |