Skip to content

Commit

Permalink
CI split JS/.NET on their own jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
arcuri82 committed Feb 15, 2022
1 parent 6989123 commit ac7a8fb
Showing 1 changed file with 74 additions and 50 deletions.
124 changes: 74 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,13 @@ env:

jobs:

build:
base:
runs-on: ubuntu-latest

steps:
# Checkout code
- uses: actions/checkout@v2

# Build/test for .Net
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Clean .Net
run: dotnet clean
- name: Build with .Net
run: dotnet build --configuration Release
- name: Tests for .Net
run: dotnet test

# Build/test for JavaScript
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
working-directory: ./client-js/evomaster-client-js
- run: npm run build
working-directory: ./client-js/evomaster-client-js
- run: npm run test
working-directory: ./client-js/evomaster-client-js
- run: npm ci
working-directory: ./client-js/integration-tests
- run: npm run build
working-directory: ./client-js/integration-tests
- run: npm run test
working-directory: ./client-js/integration-tests

# Build/test for JDK
- name: Setup JDK 8
uses: actions/setup-java@v1
Expand All @@ -74,29 +44,16 @@ jobs:
run: mvn clean verify --fae
env:
CI_env: GithubAction

- name: Upload evomaster.jar
uses: actions/upload-artifact@v2
with:
name: evomaster.jar
path: core/target/evomaster.jar
retention-days: ${{env.retention-days}}
if-no-files-found: error

# E2E for JS. Must be run AFTER the JS and Core builds
- name: E2E for JavaScript
run: bash ./client-js/e2e-tests/e2e.sh

# E2E for C#. Must be run AFTER the C# and Core builds
- name: E2E for C#
run: bash ./e2e-tests/dotnet-rest/scripts/e2e.sh


# Upload coverage results
- name: Upload coverage to CodeCov
run: curl -s https://codecov.io/bash | bash


# Only once coverage is uploaded, we try to build with other versions of Java, as "mvn clean" would delete those reports
# However, the latest LTS is fully built (with tests) on a different job
- name: Setup JDK 11
Expand All @@ -106,6 +63,7 @@ jobs:
- name: Compile with JDK 11
run: mvn clean verify -DskipTests


latest-LTS:
# run on a different OS from main build.
# It would had been good, but does not work due to Docker support :( see:
Expand All @@ -131,9 +89,75 @@ jobs:
CI_env: GithubAction


nodejs:
needs: base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Build/test for JavaScript
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: npm ci
working-directory: ./client-js/evomaster-client-js
- run: npm run build
working-directory: ./client-js/evomaster-client-js
- run: npm run test
working-directory: ./client-js/evomaster-client-js
- run: npm ci
working-directory: ./client-js/integration-tests
- run: npm run build
working-directory: ./client-js/integration-tests
- run: npm run test
working-directory: ./client-js/integration-tests
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
# E2E for JS. Must be run AFTER the JS and Core builds
- name: E2E for JavaScript
run: bash ./client-js/e2e-tests/e2e.sh


dotnet:
needs: base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Build/test for .Net
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Clean .NET
run: dotnet clean
- name: Build with .NET
run: dotnet build --configuration Release
- name: Unit tests for .NET
run: dotnet test
- name: Setup JDK ${{env.release-jdk}}
uses: actions/setup-java@v1
with:
java-version: ${{env.release-jdk}}
- name: Download fat jar
uses: actions/download-artifact@v2
with:
name: evomaster.jar
path: core/target
# E2E for C#. Must be run AFTER the C# and Core builds
- name: E2E for C#
run: bash ./e2e-tests/dotnet-rest/scripts/e2e.sh



windows:
needs: build
installer-for-windows:
needs: base
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -157,8 +181,8 @@ jobs:
retention-days: ${{env.retention-days}}
if-no-files-found: error

osx:
needs: build
installer-for-osx:
needs: base
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -182,8 +206,8 @@ jobs:
retention-days: ${{env.retention-days}}
if-no-files-found: error

debian:
needs: build
installer-for-debian:
needs: base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit ac7a8fb

Please sign in to comment.