Skip to content

Commit 2acb824

Browse files
committed
ci(github): Run scanner funTests in Docker to avoid installing tools
Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 0c55971 commit 2acb824

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -85,37 +85,10 @@ jobs:
8585
steps:
8686
- name: Checkout Repository
8787
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
88-
- name: Set tool version environment variables
89-
run: sed "s/^ARG //" docker/versions.dockerfile >> $GITHUB_ENV
90-
- name: Install required tools
91-
run: |
92-
# Uninstall mono-devel because it contains the "lc" command which conflicts with BoyterLc.
93-
sudo apt-get -qq remove mono-devel
94-
95-
# Install git-repo.
96-
mkdir -p $HOME/.local/bin
97-
curl https://storage.googleapis.com/git-repo-downloads/repo -o $HOME/.local/bin/repo
98-
chmod a+x $HOME/.local/bin/repo
99-
100-
# Install Askalono for functional tests.
101-
curl -LOs https://github.com/amzn/askalono/releases/download/$ASKALONO_VERSION/askalono-Linux.zip
102-
unzip askalono-Linux.zip -d $HOME/.local/bin
103-
104-
# Install Boyter Lc for functional tests.
105-
curl -LOs https://github.com/boyter/lc/releases/download/v$BOYTERLC_VERSION/lc-$BOYTERLC_VERSION-x86_64-unknown-linux.zip
106-
unzip lc-$BOYTERLC_VERSION-x86_64-unknown-linux.zip -d $HOME/.local/bin
107-
108-
# Install Licensee for functional tests.
109-
echo "gem: --bindir $HOME/.local/bin" > $HOME/.gemrc
110-
gem install --user-install licensee -v $LICENSEE_VERSION
111-
112-
# Install ScanCode for license texts.
113-
curl -Os https://raw.githubusercontent.com/nexB/scancode-toolkit/v$SCANCODE_VERSION/requirements.txt
114-
pipx install --pip-args="--no-cache-dir --constraint requirements.txt" scancode-toolkit==$SCANCODE_VERSION
11588
- name: Setup Gradle
11689
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4
11790
- name: Run functional tests that do not require external tools
118-
run: ./gradlew --scan -Ptests.exclude=org.ossreviewtoolkit.plugins.packagemanagers.* funTest jacocoFunTestReport
91+
run: ./gradlew --scan -Ptests.exclude=org.ossreviewtoolkit.plugins.packagemanagers.*,org.ossreviewtoolkit.plugins.scanners.* funTest jacocoFunTestReport
11992
- name: Create Test Summary
12093
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2
12194
with:
@@ -160,7 +133,7 @@ jobs:
160133
-e HOME=/home/runner \
161134
-e GRADLE_OPTS="$GRADLE_OPTS" \
162135
${{ env.TEST_IMAGE_TAG }} \
163-
-c "./gradlew --scan -Ptests.include=org.ossreviewtoolkit.plugins.packagemanagers.* funTest jacocoFunTestReport"
136+
-c "./gradlew --scan -Ptests.include=org.ossreviewtoolkit.plugins.packagemanagers.*,org.ossreviewtoolkit.plugins.scanners.* funTest jacocoFunTestReport"
164137
- name: Create Test Summary
165138
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2
166139
with:

0 commit comments

Comments
 (0)