Skip to content

[fs_connector][feat]: Add buffer management module (buffer) #516

[fs_connector][feat]: Add buffer management module (buffer)

[fs_connector][feat]: Add buffer management module (buffer) #516

Workflow file for this run

name: CI - PR Checks
on:
pull_request:
branches:
- main
- dev
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Cache system (apt) dependencies
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('**/.github/workflows/ci-pr-checks.yaml') }}
restore-keys: |
${{ runner.os }}-apt-
- name: Install system dependencies
run: |
sudo apt-get update
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get install -y libzmq3-dev pkg-config python3.12 python3.12-dev python3.12-venv
- name: Sanity check repo contents
run: ls -la
- name: Extract Go version from go.mod
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- name: Set up Go with cache
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
cache-dependency-path: ./go.sum
- name: Install dependencies
run: go mod download
# This step is still useful to verify the Python config before subsequent steps
- name: Run detect-python
run: make detect-python
- name: Cache Python (pip) dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
# This key is based ONLY on the requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install golangci-lint without running it
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.6
args: "--help"
- name: Run precommit checks with CGo environment
run: |
# Export the CGO flags required for the linter to parse CGo files.
# This duplicates some logic from the Makefile but is necessary for the CI step.
export CGO_CFLAGS="$(python3.12-config --cflags) -I./lib"
export CGO_LDFLAGS="$(python3.12-config --ldflags --embed) -L./lib -ltokenizers -ldl -lm"
export CGO_ENABLED=1
# Now run the linting command from the Makefile
make precommit
- name: Run make build
shell: bash
run: |
make build
- name: Run make test
shell: bash
run: |
make test