Using PrecompileTools #234
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
# This workflow run the StaticLint.jl on the file modified by the PR | |
name: Run static code analyzer Lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
run_lint: | |
# if: contains(github.event.pull_request.labels.*.name, 'build:lint') || github.event.label.name == 'build:lint' | |
if: ${{ github.event_name == 'push' || !contains(github.event.pull_request.labels.*.name, 'build:nolint') }} | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: read | |
steps: | |
- name: Checkout current repository | |
uses: actions/checkout@v4 | |
with: | |
path: raicode | |
- name: Checkout StaticLint.jl | |
uses: actions/checkout@v3 | |
with: | |
repository: RelationalAI/StaticLint.jl | |
ssh-key: ${{ secrets.DELVECI_SSH }} | |
path: StaticLint.jl | |
- name: Install Julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.10' | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v42 | |
- name: List all changed files | |
env: | |
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: | | |
for file in ${ALL_CHANGED_FILES}; do | |
echo "raicode/$file" >> files_to_run_lint.txt | |
echo "$file was changed" | |
done | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Run lint | |
run: bash raicode/scripts/run_static_lint.sh "RelationalAI/StaticLint.jl" ${{ steps.extract_branch.outputs.branch }} "raicode/" | |
- uses: mshick/add-pr-comment@v2 | |
with: | |
message-path: result.txt |