diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml new file mode 100644 index 00000000..c3cfbc6b --- /dev/null +++ b/.github/workflows/validate_pr.yml @@ -0,0 +1,61 @@ +name: Validate PR +on: + pull_request: + branches: [ master ] + + paths-ignore: + - '**.md' + +jobs: + build-package: + name: Test and Package + runs-on: ubuntu-latest + + services: + clinlims: + image: postgres:9.4 + env: + POSTGRES_DB: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_USER: postgres + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + steps: + - uses: actions/checkout@v2 + - name: Setup Java 7 for ant + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '7' + - name: Setup Ruby 2.3 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.3 + - name: Install Compass + run: gem install compass + - name: Install Ant 1.9 + run: | + mkdir /tmp/ant + cd /tmp/ant + wget https://dlcdn.apache.org//ant/binaries/apache-ant-1.9.16-bin.tar.gz + tar -zxf apache-ant-1.9.16-bin.tar.gz + echo "ANT_HOME=/tmp/ant/apache-ant-1.9.16" >> $GITHUB_ENV + echo "/tmp/ant/apache-ant-1.9.16/bin" >> $GITHUB_PATH + - name: Package + run: ant dist + - name: Setup DB + env: + PGPASSWORD: postgres + run: ant setupDB + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Run tests + run: ant test test-only \ No newline at end of file