Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
129204a
cache usage added
bissquit Sep 22, 2022
22c8a61
switched to more concrete path
bissquit Sep 22, 2022
9a5cba3
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Sep 22, 2022
6e88f85
debug added
bissquit Sep 22, 2022
ced16fa
handle error in debug
bissquit Sep 23, 2022
f468a04
extra tasks removed for testing
bissquit Sep 23, 2022
233220f
post check cache
bissquit Sep 23, 2022
d144a0c
tmate debug
bissquit Sep 23, 2022
8d66c86
tmate sudo false
bissquit Sep 23, 2022
5411531
cache path switched from related to direct
bissquit Sep 23, 2022
6f53f8a
debug removed
bissquit Sep 23, 2022
02578d8
switched to custom cache paths
bissquit Sep 23, 2022
67e28b7
some tests moved back
bissquit Sep 23, 2022
57a175d
typo with {}{} fixed
bissquit Sep 23, 2022
e70f520
order of tasks changed
bissquit Sep 23, 2022
39c46e6
hash key fixed; also comments added
bissquit Sep 23, 2022
031b084
matrices reverted at the old state
bissquit Sep 23, 2022
4cf8e72
previous state of single-project returned
bissquit Sep 23, 2022
c7500ee
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Sep 23, 2022
f9a5462
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Sep 26, 2022
792ce70
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Sep 27, 2022
42cc8c8
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Oct 3, 2022
5730b40
Merge branch 'main' of https://github.com/UnitTestBot/UTBotJava into …
bissquit Oct 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
order of tasks changed
  • Loading branch information
bissquit committed Sep 23, 2022
commit e70f520e8ba366e0c592758f8bd4bacf5a4e1517
127 changes: 59 additions & 68 deletions .github/workflows/build-and-run-tests-from-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,18 @@ jobs:
git fetch
git checkout ${{ github.event.inputs.commit_sha }}

- uses: actions/cache@v3
with:
path: |
/root/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', '*.gradle.kts', './*.gradle', './*.gradle.kts') }}
key: ${{ runner.os }}-gradle-framework-${{ hashFiles('*.gradle*', 'utbot-framework*/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-framework

- name: Run monitoring
run: |
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
chmod +x ./scripts/project/monitoring.sh
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}

- uses: actions/cache@v3
with:
path: /root/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle', '*.gradle.kts', './*.gradle', './*.gradle.kts') }}
key: ${{ runner.os }}-gradle-framework-${{ hashFiles('*.gradle*', 'utbot-framework*/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-framework
- name: Run tests
run: |
gradle --build-cache --no-daemon :utbot-framework-test:test ${{ matrix.project.TESTS_TO_RUN }}
Expand Down Expand Up @@ -128,57 +125,54 @@ jobs:
runs-on: ubuntu-20.04
container: unittestbot/java-env:java11-zulu-jdk-gradle7.4.2-kotlinc1.7.0
steps:
- name: Print environment variables
run: printenv

- name: Checkout repository
uses: actions/checkout@v3
- name: Check out ${{ github.event.inputs.commit_sha }} commit
if: github.event.inputs.commit_sha != ''
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git fetch
git checkout ${{ github.event.inputs.commit_sha }}

- uses: actions/cache@v3
with:
path: |
/root/.gradle/caches
key: ${{ runner.os }}-gradle-${{ matrix.projects.first }}-${{ hashFiles('*.gradle*', format('{0}{1}', matrix.projects.first, '/*.gradle*')) }}
restore-keys: |
${{ runner.os }}-gradle-${{ matrix.projects.first }}-

- name: Run monitoring
run: |
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
chmod +x ./scripts/project/monitoring.sh
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}

- name: Build project ${{ matrix.projects.first }}
id: first-project
run: |
cd ${{ matrix.projects.first }}
gradle build --build-cache --no-daemon

- name: Build project ${{ matrix.projects.second }}
if: ${{ steps.first-project.outcome != 'cancelled' && steps.first-project.outcome != 'skipped' }}
run: |
cd ${{ matrix.projects.second }}
gradle build --build-cache --no-daemon

- name: Upload test report if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test_report ${{ matrix.projects.first }}
path: ${{ matrix.projects.first }}/build/reports/tests/test/*

- name: Upload test report if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test_report ${{ matrix.projects.second }}
path: ${{ matrix.projects.second }}/build/reports/tests/test/*
- name: Print environment variables
run: printenv

- name: Checkout repository
uses: actions/checkout@v3
- name: Check out ${{ github.event.inputs.commit_sha }} commit
if: github.event.inputs.commit_sha != ''
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git fetch
git checkout ${{ github.event.inputs.commit_sha }}

- name: Run monitoring
run: |
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
chmod +x ./scripts/project/monitoring.sh
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}

- uses: actions/cache@v3
with:
path: /root/.gradle/caches
key: ${{ runner.os }}-gradle-${{ matrix.projects.first }}-${{ hashFiles('*.gradle*', format('{0}{1}', matrix.projects.first, '/*.gradle*')) }}
restore-keys: ${{ runner.os }}-gradle-${{ matrix.projects.first }}-
- name: Build project ${{ matrix.projects.first }}
id: first-project
run: |
cd ${{ matrix.projects.first }}
gradle build --build-cache --no-daemon

- name: Build project ${{ matrix.projects.second }}
if: ${{ steps.first-project.outcome != 'cancelled' && steps.first-project.outcome != 'skipped' }}
run: |
cd ${{ matrix.projects.second }}
gradle build --build-cache --no-daemon

- name: Upload test report if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test_report ${{ matrix.projects.first }}
path: ${{ matrix.projects.first }}/build/reports/tests/test/*

- name: Upload test report if tests have failed
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: test_report ${{ matrix.projects.second }}
path: ${{ matrix.projects.second }}/build/reports/tests/test/*


single-project:
Expand Down Expand Up @@ -209,20 +203,17 @@ jobs:
git fetch
git checkout ${{ github.event.inputs.commit_sha }}

- uses: actions/cache@v3
with:
path: |
/root/.gradle/caches
key: ${{ runner.os }}-gradle-${{ matrix.project }}-${{ hashFiles('*.gradle*', format('{0}{1}', matrix.project, '/*.gradle*')) }}
restore-keys: |
${{ runner.os }}-gradle-${{ matrix.project }}-

- name: Run monitoring
run: |
echo Find your Prometheus metrics using label {instance=\"${GITHUB_RUN_ID}-${HOSTNAME}\"}
chmod +x ./scripts/project/monitoring.sh
./scripts/project/monitoring.sh ${{ secrets.PUSHGATEWAY_HOSTNAME }} ${{ secrets.PUSHGATEWAY_USER }} ${{ secrets.PUSHGATEWAY_PASSWORD }}

- uses: actions/cache@v3
with:
path: /root/.gradle/caches
key: ${{ runner.os }}-gradle-${{ matrix.project }}-${{ hashFiles('*.gradle*', format('{0}{1}', matrix.project, '/*.gradle*')) }}
restore-keys: ${{ runner.os }}-gradle-${{ matrix.project }}-
- name: Run tests
run: |
cd ${{ matrix.project }}
Expand Down