From 4397a959e806bf476be4c81bc804616adf58b969 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 12 May 2021 22:42:12 +0200 Subject: ui: Migrate from CRA to Next.js This change updates the web frontend to use Next.js instead of Create React App (CRA). Next.js enables the possibility of rendering pages on the server side (which reduces the time to first frame) and overall provides a better development experience. Future commits will try to futher optimize the implementation for Next.js. --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf2f80d..f2effb2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,18 +98,17 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [14.x] + node: [16] defaults: run: working-directory: opendc-web/opendc-web-ui steps: - uses: actions/checkout@v2 - name: Set up Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} - - run: npm install - - run: npm run build --if-present - - run: npm test + - run: yarn install --frozen-lockfile + - run: yarn build env: CI: true -- cgit v1.2.3 From eac80eaa36560dc43e338ade58267860865d1c48 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 17 Mar 2021 16:44:51 +0100 Subject: ci: Update to Java 16 This change switches one of the CI builds to use Java 16 when building and testing the simulator. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbf2f80d..8690cf5b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [8, 15] + java: [8, 16] steps: - name: Checkout repository uses: actions/checkout@v2 -- cgit v1.2.3 From 688a25e560db3355e2a3ee369c2e6f4b55aab2a6 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 17 May 2021 10:28:12 +0200 Subject: api: Upgrade to Python 3.9 as default This change updates the API server to run by default using Python 3.9. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2effb2f..118e1713 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,7 +61,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python: [3.8] + python: [3.9] defaults: run: working-directory: opendc-web/opendc-web-api -- cgit v1.2.3 From cd2e3288d28d23556a81bad76dab0aae2e055ac2 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 1 Jun 2021 12:30:40 +0200 Subject: ci: Fix code coverage reporting for web API This change updates the build workflow to properly report the code coverage reports of the web API to Codecov. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c42e638..b0e8cc38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,19 +78,19 @@ jobs: - name: Lint with pylint run: ./check.sh - name: Test with pytest - run: pytest --cov=opendc/ --junitxml=.junit-report.xml + run: pytest --cov --cov-report=xml --junitxml=junit-report.xml - name: Publish report if: always() uses: mikepenz/action-junit-report@v2 with: check_name: test (Python ${{ matrix.python }}) - report_paths: '**/.junit-report.xml' + report_paths: '**/junit-report.xml' github_token: ${{ secrets.GITHUB_TOKEN }} - name: Upload code coverage uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - files: opendc-web/opendc-web-api/.coverage + files: opendc-web/opendc-web-api/coverage.xml flags: api build-ui: name: Build UI (Node ${{ matrix.node }}) -- cgit v1.2.3 From 8d386248202dbde4f9ee6a77435f2740fb2e1160 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 8 Jun 2021 22:34:07 +0200 Subject: ci: Test simulator on Windows This change adds Windows as CI target for the OpenDC simulator in order to test that the simulator works on all major platforms. --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0e8cc38..28e5846b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,9 @@ jobs: matrix: os: [ubuntu-latest] java: [8, 16] + include: + - os: windows-latest + java: 16 steps: - name: Checkout repository uses: actions/checkout@v2 -- cgit v1.2.3 From 147951f39de8f93eba6c7b0b7e6e5c9d2bce32e7 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 22 Jun 2021 14:13:22 +0200 Subject: ci: Optimize Gradle build performance in Github Actions This change updates the Github Actions Gradle workflows in order to improve the runtime performance of these workflows. We have now enabled build caching as well as parallel builds to speed up the build process. Moreover, we now cache the Gradle wrapper. --- .github/workflows/build.yml | 17 +++++++++++++---- .github/workflows/release.yml | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28e5846b..257ad2e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,16 +26,25 @@ jobs: java-version: ${{ matrix.java }} - name: Grant execute permission for gradlew run: chmod +x gradlew - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }} + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-${{ matrix.java }}-gradle- - name: Build with Gradle - run: ./gradlew assemble + run: ./gradlew classes - name: Check with Gradle run: ./gradlew check codeCoverageReport + - name: Cleanup Gradle Daemons + run: ./gradlew --stop + - name: Cleanup Gradle Cache + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties + shell: bash - name: Publish report if: always() uses: mikepenz/action-junit-report@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f76cdd09..c525eb97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ 15 ] + java: [ 16 ] steps: - name: Checkout repository uses: actions/checkout@v2 @@ -22,10 +22,12 @@ jobs: java-version: ${{ matrix.java }} - name: Grant execute permission for gradlew run: chmod +x gradlew - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: - path: ~/.gradle/caches - key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('**/*.gradle*') }} + path:| + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-${{ matrix.java }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-${{ matrix.java }}-gradle- - name: Build with Gradle @@ -46,3 +48,10 @@ jobs: files: build/distributions/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Cleanup Gradle Daemons + run: ./gradlew --stop + - name: Cleanup Gradle Cache + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties + shell: bash -- cgit v1.2.3 From 07958ab26e94d5ab7e0873cc00d7beb9c417975e Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 24 Jun 2021 20:33:18 +0200 Subject: ci: Build pushes to master branch This change updates the build workflow to trigger on pushes to the master branch. We previously removed this trigger to reduce the number of CI builds when merging changes into the master branch. However, with the integration of Codecov as well as the caching steps in the workflow, it makes sense to build every push to the master branch. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 257ad2e3..99b5ca96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build on: pull_request: branches: [master] + push: + branches: [master] jobs: build-simulator: -- cgit v1.2.3 From 0e52785dfc5e99f48718530976083cfbd1507651 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 5 Jul 2021 15:36:23 +0200 Subject: ui: Fix linting errors --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99b5ca96..ff1ee85f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,3 +126,6 @@ jobs: - run: yarn build env: CI: true + - run: yarn next lint + env: + CI: true -- cgit v1.2.3 From 54bccf522e169d5cba6489291217f3307ae71094 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Tue, 28 Sep 2021 11:26:47 +0200 Subject: build: Increase Java requirement to version 11 This change updates the Gradle configuration to target Java 11 (instead of Java 8) as the lowest denominator when building OpenDC. Since the project has not yet been adopted by (many) other applications, we should not restrict the project to such an old Java version. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff1ee85f..9bd42254 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - java: [8, 16] + java: [11, 16] include: - os: windows-latest java: 16 -- cgit v1.2.3