Skip to content

Commit

Permalink
optimize: update codeql and ci (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyin committed Apr 29, 2024
1 parent 8c18ee2 commit 18c1d17
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/CI.yml
Expand Up @@ -21,4 +21,15 @@ jobs:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Test with Maven
run: mvn test -B --file pom.xml
run: |
directories=("at-sample" "saga-sample" "tcc-sample" "xa-sample")
for dir in "${directories[@]}"; do
for subdir in "$dir"/*; do
if [ -d "$subdir" ]; then
echo "Entering directory $subdir"
cd "$subdir"
mvn -B test
cd - > /dev/null
fi
done
done
25 changes: 18 additions & 7 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -38,22 +38,31 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Build
run: |
directories=("at-sample" "saga-sample" "tcc-sample" "xa-sample")
for dir in "${directories[@]}"; do
for subdir in "$dir"/*; do
if [ -d "$subdir" ]; then
echo "Entering directory $subdir"
cd "$subdir"
mvn -B package
cd - > /dev/null
fi
done
done
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +76,6 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

0 comments on commit 18c1d17

Please sign in to comment.