CI #1542
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- master | |
- prod | |
pull_request: | |
branches: | |
- master | |
- prod | |
schedule: | |
- cron: '0 4 * * *' | |
jobs: | |
Test: | |
name: Run tests | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
jdk: [ 17 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.jdk }} | |
- name: Run generator tests | |
run: mvn test -Dgroups=generator-${{ matrix.jdk }} | |
- name: Run other tests | |
run: mvn test -DexcludedGroups=generator | |
Deploy: | |
name: Deploy to starter machine | |
if: ${{ github.repository_owner == 'vert-x3' && github.event_name == 'push' && github.ref == 'refs/heads/prod' }} | |
needs: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup SSH | |
uses: kielabokkie/ssh-key-and-known-hosts-action@v1 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
ssh-host: 13.94.149.21 | |
- name: Assemble | |
run: mvn package -DskipTests | |
- name: Run deployment script | |
run: bash .gh.deploy.bash |