Skip to content

Test against latest libraries #645

Test against latest libraries

Test against latest libraries #645

Workflow file for this run

on:
push:
pull_request:
schedule:
- cron: '0 23 * * 2,4,6'
name: Test against latest libraries
jobs:
node:
name: Node.js
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x, lts/*, current]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.8.1
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: [1.18.x, 1.19.x]
defaults:
run:
working-directory: go
steps:
- uses: actions/checkout@v3
- name: Use Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
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@v3
- 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