github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/.github/workflows/lint.yml (about) 1 name: Lint 2 on: [push] 3 jobs: 4 lint: 5 name: Lint 6 runs-on: ubuntu-latest 7 steps: 8 - uses: actions/checkout@v3 9 - uses: actions/setup-node@v1 10 with: 11 node-version: "18" 12 - run: npm install 13 - run: npm run lint 14 15 compare-output: 16 runs-on: ubuntu-latest 17 steps: 18 - uses: actions/checkout@v3 19 - uses: actions/setup-node@v1 20 with: 21 node-version: "18" 22 - run: npm install 23 - run: npx swagger-cli bundle -t json -w 300 main.yaml > doc/compiled_new.json 24 - run: diff doc/compiled.json doc/compiled_new.json 25 26 compile-go: 27 runs-on: ubuntu-latest 28 steps: 29 - name: Checkout 🛎️ 30 uses: actions/checkout@v3 31 with: 32 persist-credentials: false 33 - name: Set up Go 34 uses: actions/setup-go@v2 35 with: 36 go-version: 1.19.6 37 - name: Build 38 env: 39 API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} 40 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 run: | 42 npm install 43 npm run generate.go 44 cd clients/go && go build 45 46 # compile-cli: 47 # runs-on: ubuntu-latest 48 # steps: 49 # - name: Checkout 🛎️ 50 # uses: actions/checkout@v3 51 # with: 52 # persist-credentials: false 53 # - name: Set up Go 54 # uses: actions/setup-go@v2 55 # with: 56 # go-version: 1.19.6 57 # - name: Build 58 # env: 59 # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} 60 # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 61 # run: | 62 # npm install 63 # npm run generate.cli 64 # cd clients/cli && go build