[Java] Exchange ossrh with sonatype central publishing #317
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: Java (build) | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'visual-java/**' | |
- .github/workflows/java-build.yml | |
pull_request: | |
paths: | |
- 'visual-java/**' | |
- .github/workflows/java-build.yml | |
defaults: | |
run: | |
working-directory: visual-java | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ['11', '17'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.version }} | |
cache: 'maven' | |
- name: Build and Lint with Maven | |
run: mvn -B verify --file pom.xml | |
# Runs the ENV integration test, using our single test suite for all SDKs & a dockerfile for each. | |
# Has specific expectations for a limited number of results so adding more here isn't ideal. | |
integration-test-env: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push to local registry | |
uses: docker/build-push-action@v5 | |
with: | |
context: '{{defaultContext}}:visual-java' | |
tags: saucelabs/visual-java | |
file: Dockerfile | |
load: true | |
- name: Run the integration tests | |
run: | | |
npm ci | |
npm run test | |
working-directory: tests | |
env: | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
CONTAINER_IMAGE_NAME: saucelabs/visual-java | |
# Houses all the 'standard' integration tests for local & Sauce session support. | |
integration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'maven' | |
- name: Run integration tests | |
env: | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
run: | | |
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' --form 'payload=@"../tests/assets/SauceLabs-Demo-App.Simulator.ipa"' --form 'name="visual-sdks-ios-simulator.ipa"' -o /dev/null | |
./mvnw -q test -Dtest=com.saucelabs.visual.integration.** |