From cc940c0b82d4b8b661ab7be0d563f0deba9ea3b6 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Wed, 5 May 2021 20:48:19 -0500 Subject: [PATCH] Add initial GitHub Actions CI configuration. --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ .github/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..408e9e7cb9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: pull_request + +jobs: + build: + runs-on: ubuntu-latest + + env: + SPARK_LOCAL_IP: localhost + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - run: mvn --batch-mode --update-snapshots clean package diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000000..dec10b1a87 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy Snapshot + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + if: ${{ github.repository == 'bigdatagenomics/adam' }} + env: + SPARK_LOCAL_IP: localhost + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + server-id: sonatype-nexus-snapshots + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - env: + MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} + run: mvn --batch-mode -DskipTests=true deploy