name: Finance Pack CI on: push: branches: [main, develop] pull_request: branches: [main, develop] jobs: test-python: name: Test Python runs-on: ubuntu-latest strategy: matrix: python-version: ["3.10", "3.11"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run Python tests run: | python -m pytest -v continue-on-error: true test-typescript: name: Test TypeScript runs-on: ubuntu-latest strategy: matrix: node-version: ["18.x", "20.x"] steps: - uses: actions/checkout@v4 - name: Set up Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: Install dependencies run: npm ci - name: Build TypeScript run: npm run build - name: Run TypeScript tests run: npm test continue-on-error: true lint: name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.10" - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: "18.x" - name: Install dependencies run: | pip install -r requirements.txt npm ci - name: Lint TypeScript run: npm run lint continue-on-error: true branches: ["**"] pull_request: jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.x' - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '18' - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.21' - name: Install linters run: | python -m pip install --upgrade pip ruff npm install eslint go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - name: Ruff run: ruff check agents tests - name: ESLint run: npx eslint agents widgets demo tests --ext .ts,.vue - name: golangci-lint run: | export PATH="$PATH:$(go env GOPATH)/bin" golangci-lint run ./... tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.x' - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '18' - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.21' - name: Install deps run: | python -m pip install --upgrade pip pytest npm install jest @types/jest ts-jest typescript if [ ! -f go.mod ]; then go mod init financepack; fi go mod tidy || true - name: Pytest run: pytest -q - name: Jest run: npx jest --runInBand - name: Go test run: go test ./... validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Ensure pack manifest exists run: | if [ ! -f "pack.yaml" ]; then echo "pack.yaml missing" && exit 1 fi