New input type for semgrep-core allows taking scanning roots instead of target files #594
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
name: Linting | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: | |
pull-requests: write # for comments | |
jobs: | |
compatibility: | |
runs-on: ubuntu-latest | |
container: returntocorp/ocaml:alpine | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: atddiff all supported tags | |
id: diff | |
shell: bash | |
run: | | |
set -x | |
git config --global --add safe.directory "$(pwd)" | |
# github actions sets HOME=/home/github where we don't have an opam env | |
eval $(HOME=/root opam env) | |
apk add jq | |
# check / print version of atddiff | |
atddiff --version | |
# run the checks | |
echo -ne 'Backwards compatibility summary:\n\n```' > summary-00-header.txt | |
echo '```' >> summary-20-footer.txt | |
# fail if check command fails | |
set -o pipefail | |
./scripts/check-backwards-compatibility | tee summary-10-body.txt | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: ${{ !cancelled() }} | |
with: | |
header: diff-summary | |
path: summary-*.txt | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout tree | |
uses: actions/checkout@v4 | |
- name: Run mypy on semgrep_output_v1.py | |
run: | | |
pip install mypy | |
rm __init__.py # because dir has a - in it | |
mypy semgrep_output_v1.py |