chore(deps): update dependency go to 1.26 #115
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] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-test- | |
| - name: Run tests | |
| run: | | |
| cargo test --lib --verbose -- --test-threads=1 | |
| cargo test --test integration_tests --verbose -- --test-threads=1 | |
| cargo test --test gherkin_tests --verbose | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-clippy- | |
| - name: Run Clippy | |
| run: cargo clippy -- -D warnings | |
| fmt: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| build-wasm: | |
| name: Build WASM | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-wasm- | |
| - name: Build WASM | |
| run: cargo build --target wasm32-unknown-unknown --no-default-features --release --lib | |
| - name: Upload WASM artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: target/wasm32-unknown-unknown/release/flagd_evaluator.wasm | |
| retention-days: 30 | |
| test-go: | |
| name: Test Go Package | |
| needs: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.26' | |
| cache-dependency-path: go/go.sum | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: go/ | |
| - name: Run Go tests | |
| run: cd go && go test -short -v -count=1 ./... | |
| test-js: | |
| name: Test JS Package | |
| needs: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: js/ | |
| - name: Install dependencies | |
| run: cd js && npm ci | |
| - name: Type check | |
| run: cd js && npx tsc --noEmit | |
| - name: Run tests | |
| run: cd js && npx vitest run | |
| test-dotnet: | |
| name: Test .NET Package | |
| needs: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0' | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: dotnet/src/FlagdEvaluator/ | |
| - name: Run tests | |
| run: cd dotnet && dotnet test dotnet.sln -c Release --logger "console;verbosity=detailed" | |
| test-python-native: | |
| name: Test Python Native Bindings (PyO3) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies and build package | |
| run: | | |
| cd python | |
| uv sync --group dev | |
| source .venv/bin/activate | |
| maturin develop | |
| - name: Run native tests | |
| run: | | |
| cd python | |
| source .venv/bin/activate | |
| pytest tests/ -v --ignore=tests/test_wasm_evaluator.py | |
| test-python-wasm: | |
| name: Test Python WASM Evaluator | |
| needs: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: python/flagd_evaluator_wasm/ | |
| - name: Install dependencies | |
| run: | | |
| cd python | |
| uv sync --group dev | |
| source .venv/bin/activate | |
| - name: Run WASM tests | |
| run: | | |
| cd python | |
| source .venv/bin/activate | |
| pytest tests/test_wasm_evaluator.py -v | |
| test-java: | |
| name: Test Java Library | |
| needs: build-wasm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: 'maven' | |
| - name: Download WASM artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flagd_evaluator.wasm | |
| path: target/wasm32-unknown-unknown/release/ | |
| - name: Make Maven wrapper executable | |
| run: chmod +x java/mvnw | |
| - name: Build with Maven (skip WASM build) | |
| run: cd java && ./mvnw clean verify -Dexec.skip=true | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: java-test-results | |
| path: java/target/surefire-reports/ | |
| retention-days: 30 | |
| - name: Upload Java JAR artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: java-library | |
| path: | | |
| java/target/*.jar | |
| retention-days: 30 | |
| ci-success: | |
| name: CI | |
| if: always() | |
| needs: | |
| - test | |
| - clippy | |
| - fmt | |
| - build-wasm | |
| - test-go | |
| - test-js | |
| - test-dotnet | |
| - test-python-native | |
| - test-python-wasm | |
| - test-java | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| results="${{ join(needs.*.result, ' ') }}" | |
| for result in $results; do | |
| if [[ "$result" == "failure" || "$result" == "cancelled" ]]; then | |
| echo "One or more CI jobs failed or were cancelled: $results" | |
| exit 1 | |
| fi | |
| done | |
| echo "All CI jobs passed: $results" |