2023-03-28 05:50:58 +00:00
|
|
|
name: "Check Deprecations"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
# Runs on PRs to main
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deprecations-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-07-05 21:19:49 +00:00
|
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
2023-03-28 05:50:58 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0 # by default the checkout action doesn't checkout all branches
|
|
|
|
- name: Setup Go
|
2023-07-05 21:19:49 +00:00
|
|
|
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
|
2023-03-28 05:50:58 +00:00
|
|
|
with:
|
|
|
|
go-version-file: ./.go-version
|
|
|
|
cache: true
|
|
|
|
- name: Install required tools
|
|
|
|
run: |
|
|
|
|
make bootstrap
|
|
|
|
- name: Check deprecations for files in diff
|
|
|
|
run: |
|
|
|
|
# Need to run this from repository root and not from scripts/ as staticcheck works
|
|
|
|
# only on packages
|
|
|
|
./scripts/deprecations-checker.sh ${{ github.event.pull_request.base.ref }} ${{ github.event.repository.name }}
|
|
|
|
|