Skip to content

Commit

Permalink
GSW-2020 build: support tlin in ci (#424)
Browse files Browse the repository at this point in the history
* build: support tlin in ci

* fix: cd

* fix: ci

* fix: get changed directories

* feat: run tlin for changed dir

* build: bump tj-action version
  • Loading branch information
r3v4s authored Dec 10, 2024
1 parent 0b2f4ae commit fdcf9cb
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/tlin_check.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fdcf9cb

Please sign in to comment.