Skip to content

Test against latest libraries #918

Test against latest libraries

Test against latest libraries #918

Workflow file for this run

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@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
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@v4
- 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@v4
- 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