(feat): re-enable snap sync #6896
Workflow file for this run
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: | |
| - 'master' | |
| - 'develop' | |
| pull_request: | |
| branches: | |
| - '**' | |
| types: [opened, synchronize] | |
| concurrency: | |
| group: build-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build | |
| if: (github.event.action != 'closed' || github.event.pull_request.merged == true) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: | | |
| git submodule update --init --recursive --force | |
| git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dependencies on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt install build-essential | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/Library/Caches/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: ${{ runner.os }}-go- | |
| - name: Build | |
| run: make all | |
| lint: | |
| if: (github.event.action != 'closed' || github.event.pull_request.merged == true) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: | | |
| git submodule update --init --recursive --force | |
| git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dependencies on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt install build-essential | |
| - name: Golang-ci install | |
| if: runner.os == 'Linux' | |
| run: make lint-deps | |
| - name: Lint | |
| if: runner.os == 'Linux' | |
| run: make lint | |
| unit-tests: | |
| if: (github.event.action != 'closed' || github.event.pull_request.merged == true) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: | | |
| git submodule update --init --recursive --force | |
| git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dependencies on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt install build-essential | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/Library/Caches/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: ${{ runner.os }}-go- | |
| - name: Test | |
| run: make test | |
| - uses: PaloAltoNetworks/upload-secure-artifact@main | |
| with: | |
| name: unitTest-coverage | |
| path: cover.out | |
| integration-tests: | |
| if: (github.event.action != 'closed' || github.event.pull_request.merged == true) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - run: | | |
| git submodule update --init --recursive --force | |
| git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install dependencies on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt install build-essential | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/Library/Caches/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: ${{ runner.os }}-go- | |
| - name: test-integration | |
| run: make test-integration | |
| - uses: PaloAltoNetworks/upload-secure-artifact@main | |
| with: | |
| name: integrationTest-coverage | |
| path: cover.out | |
| codecov: | |
| if: (github.event.action != 'closed' || github.event.pull_request.merged == true) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments | |
| runs-on: ${{ matrix.os }} | |
| needs: [unit-tests, integration-tests] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v6.0.0 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| verbose: true |