diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index a0b4c148..d22ecb2b 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -4,14 +4,48 @@ on: [ pull_request ] jobs: compliant: - runs-on: ubuntu-latest + runs-on: [ self-hosted, Linux, X64 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - name: Check License Header uses: apache/skywalking-eyes/header@v0.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: Check Spell - # uses: crate-ci/typos@master + - name: Check Spell + uses: crate-ci/typos@master + + lint: + runs-on: [ self-hosted, Linux, X64 ] + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + cache: false # don't use cache for self-hosted runners + + - name: Golangci Lint + # https://golangci-lint.run/ + uses: golangci/golangci-lint-action@v6 + with: + version: latest + only-new-issues: true + + typecheck: + runs-on: [ self-hosted, Linux, X64 ] + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: false # don't use cache for self-hosted runners + + - name: Install dependencies + working-directory: ./ts-parser + run: npm ci + + - name: Run TypeScript type check + working-directory: ./ts-parser + run: npm run typecheck diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..4481aeae --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,7 @@ +run: + skip-dirs: + - testdata + - testrepo + - sentry + skip-files: + - ".*_test\\.go$" \ No newline at end of file diff --git a/.licenserc.yaml b/.licenserc.yaml index 6046e128..82e2973a 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -7,4 +7,8 @@ header: - '**/*.go' - '**/*.s' + paths-ignore: + - 'testdata/**' + - 'testrepo/**' + comment: on-failure \ No newline at end of file diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..59b5f59a --- /dev/null +++ b/.typos.toml @@ -0,0 +1,2 @@ +[files] +extend-exclude = ["testdata/**", "testrepo/**", "sentry/**"] \ No newline at end of file