Test against latest libraries #1179
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
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: "0 23 * * 2,4,6" | |
| name: Test against latest libraries | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./js | |
| jobs: | |
| node: | |
| name: Node.js | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [18.x, 20.x, lts/*, current] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install latest version of dependencies | |
| run: | | |
| npm install $(node -pe 'Object.keys(require("./package.json").dependencies).map((d) => `${d}@latest`).join(" ")') | |
| - name: Node.js information | |
| run: | | |
| node -v | |
| npm -v | |
| npm ls | |
| - name: Run tests | |
| run: npm test | |
| go: | |
| name: go | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| go-version: ["oldstable", "stable"] | |
| defaults: | |
| run: | |
| working-directory: go | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Install latest version of dependencies | |
| run: | | |
| go get github.com/ipld/go-ipld-prime@master | |
| go get -u -d | |
| - name: Go information | |
| run: | | |
| go version | |
| go env | |
| cat go.mod | |
| - name: Run tests | |
| run: go test -v ./... | |
| rust: | |
| name: rust | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust-version: | |
| - stable | |
| - nightly | |
| manifest: | |
| - Cargo.toml | |
| - Cargo_latest_git.toml | |
| defaults: | |
| run: | |
| working-directory: rust | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Rust ${{ matrix.rust-version }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust-version }} | |
| # The manifest file needs to be named `Cargo.toml`, hence rename if needed. | |
| - name: Use specified manifest file ${{ matrix.manifest }} | |
| if: matrix.manifest != 'Cargo.toml' | |
| run: mv ${{ matrix.manifest }} Cargo.toml | |
| - name: Rust information with ${{ matrix.manifest }} | |
| run: | | |
| cargo --version | |
| cargo tree | |
| - name: Run tests with ${{ matrix.manifest }} | |
| run: cargo test -- --nocapture | |
| python: | |
| name: python | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./python | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Python information | |
| run: | | |
| python --version | |
| pip list | |
| - name: Run tests | |
| run: | | |
| pytest |