diff --git a/.github/workflows/tlin_check.yml b/.github/workflows/tlin_check.yml new file mode 100644 index 000000000..9b6f23fb0 --- /dev/null +++ b/.github/workflows/tlin_check.yml @@ -0,0 +1,43 @@ +name: tlin-check + +on: + pull_request: + branches: + - main + +jobs: + tlin-check: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: checkout tlin + uses: actions/checkout@v3 + with: + repository: gnoverse/tlin + ref: main + path: ./tlin + - name: setup go + uses: actions/setup-go@v5 + with: + go-version: 1.22 + - name: changed directories + id: changed_directories + uses: tj-actions/changed-files@v45 + with: + dir_names: "true" + - name: list changed directories + run: | + echo "Changed directories: ${{ steps.changed_directories.outputs.all_changed_files }}" + - name: install tlin + run: | + cd tlin + go install ./cmd/tlin + - name: tlin check + run: | + for directory in ${{ steps.changed_directories.outputs.all_changed_files }}; do + echo "checking $directory ..." + tlin $directory + done