-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Refactor testing to use check.sh
Also adds matrix of supported versions to CI check. Related to: #33
- Loading branch information
Showing
4 changed files
with
57 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
name: clang-format-${{ matrix.version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 4 | ||
- 5 | ||
- 6 | ||
- 7 | ||
- 8 | ||
- 9 | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Build and test the Docker image | ||
run: test/test.sh ${{ matrix.version }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
FALLBACK_STYLE="llvm" | ||
EXCLUDE_REGEX="capital" | ||
CLANG_FORMAT_VERSION="$1" | ||
|
||
# should succeed | ||
"$GITHUB_WORKSPACE"/check.sh "$CLANG_FORMAT_VERSION" "$GITHUB_WORKSPACE/test/known_pass" "$FALLBACK_STYLE" "$EXCLUDE_REGEX" | ||
docker_status="$?" | ||
if [[ "$docker_status" != "0" ]]; then | ||
echo "files that should succeed have failed!" | ||
exit 1 | ||
fi | ||
|
||
# should fail | ||
"$GITHUB_WORKSPACE"/check.sh "$CLANG_FORMAT_VERSION" "$GITHUB_WORKSPACE/test/known_fail" "$FALLBACK_STYLE" "$EXCLUDE_REGEX" | ||
docker_status="$?" | ||
if [[ "$docker_status" == "0" ]]; then | ||
echo "files that should fail have succeeded!" | ||
exit 2 | ||
fi |