Skip to content

wip

wip #1

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Zulu JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Build with Gradle
if: github.ref != 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./gradlew build -x :conductor-contribs:test --scan
- name: Build and Publish snapshot
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: |
echo "Running build for commit ${{ github.sha }}"
./gradlew build -x :conductor-contribs:test snapshot --scan
env:
NETFLIX_OSS_SIGNING_KEY: ${{ secrets.ORG_SIGNING_KEY }}
NETFLIX_OSS_SIGNING_PASSWORD: ${{ secrets.ORG_SIGNING_PASSWORD }}
NETFLIX_OSS_REPO_USERNAME: ${{ secrets.ORG_NETFLIXOSS_USERNAME }}
NETFLIX_OSS_REPO_PASSWORD: ${{ secrets.ORG_NETFLIXOSS_PASSWORD }}
- name: Upload build reports
uses: actions/upload-artifact@v3
with:
name: build-reports
path: '**/build/reports'
- name: Upload server artifact
uses: actions/upload-artifact@v3
with:
name: server-jar
path: server/build/libs/*-boot.jar
- name: Store Buildscan URL
uses: actions/upload-artifact@v3
with:
name: build-scan
path: 'buildscan.log'
build-ui:
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ui
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: server-jar
path: jar
- name: Display structure of downloaded files
run: ls -R
- name: Install dependencies
run: yarn install
- name: Run Yarn build
run: yarn run build