Merge pull request #18 from containerd/dependabot/github_actions/acti… #42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| # | |
| # golangci-lint | |
| # | |
| linters: | |
| permissions: | |
| contents: read # for actions/checkout to fetch code | |
| pull-requests: read # for golangci/golangci-lint-action to fetch pull requests | |
| name: Linters | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] # windows-latest has fmt issue | |
| steps: | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - uses: actions/checkout@v7 | |
| - uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.7.2 | |
| skip-cache: true | |
| args: --timeout=5m | |
| # | |
| # Project checks | |
| # | |
| project: | |
| name: Project Checks | |
| if: github.repository == 'containerd/plugin' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - uses: actions/checkout@v7 | |
| with: | |
| path: src/github.com/containerd/plugin | |
| fetch-depth: 25 | |
| - uses: containerd/project-checks@d7751f3c375b8fe4a84c02a068184ee4c1f59bc4 # v1.2.2 | |
| with: | |
| working-directory: src/github.com/containerd/plugin | |
| repo-access-token: ${{ secrets.GITHUB_TOKEN }} | |
| tests: | |
| name: Tests | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 5 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| path: src/github.com/containerd/plugin | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Set env | |
| shell: bash | |
| run: | | |
| echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
| echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
| - run: | | |
| go test -v -race | |
| working-directory: src/github.com/containerd/plugin |