mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
86 lines
2.2 KiB
YAML
86 lines
2.2 KiB
YAML
name: Migrations
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
# Migration implementation files
|
|
- 'repo/fsrepo/migrations/**'
|
|
- 'test/cli/migrations/**'
|
|
# Config and repo handling
|
|
- 'repo/fsrepo/**'
|
|
# This workflow file itself
|
|
- '.github/workflows/test-migrations.yml'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'release-*'
|
|
paths:
|
|
- 'repo/fsrepo/migrations/**'
|
|
- 'test/cli/migrations/**'
|
|
- 'repo/fsrepo/**'
|
|
- '.github/workflows/test-migrations.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 20
|
|
env:
|
|
TEST_VERBOSE: 1
|
|
IPFS_CHECK_RCMGR_DEFAULTS: 1
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Check out Kubo
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Build kubo binary
|
|
run: |
|
|
make build
|
|
echo "Built ipfs binary at $(pwd)/cmd/ipfs/"
|
|
|
|
- name: Add kubo to PATH
|
|
run: |
|
|
echo "$(pwd)/cmd/ipfs" >> $GITHUB_PATH
|
|
|
|
- name: Verify ipfs in PATH
|
|
run: |
|
|
which ipfs || echo "ipfs not in PATH"
|
|
ipfs version || echo "Failed to run ipfs version"
|
|
|
|
- name: Run migration unit tests
|
|
run: |
|
|
go test ./repo/fsrepo/migrations/...
|
|
|
|
- name: Run CLI migration tests
|
|
env:
|
|
IPFS_PATH: ${{ runner.temp }}/ipfs-test
|
|
run: |
|
|
export PATH="${{ github.workspace }}/cmd/ipfs:$PATH"
|
|
which ipfs || echo "ipfs not found in PATH"
|
|
ipfs version || echo "Failed to run ipfs version"
|
|
go test ./test/cli/migrations/...
|
|
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: ${{ matrix.os }}-test-results
|
|
path: |
|
|
test/**/*.log
|
|
${{ runner.temp }}/ipfs-test/
|