Bump ibnesayeed/setup-ipfs from fa9de9ebdf580cf20c588d867a2d62044f956495 to c779340c110024feeb46579fef211c89332caf85 #65
This file contains 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: Testing | |
on: | |
push: | |
branches: | |
- "*" | |
paths: | |
- "**/*.go" | |
- "go.mod" | |
- "go.sum" | |
- ".github/workflows/testing.yml" | |
- "Makefile" | |
pull_request: | |
branches: [ main ] | |
types: [ opened, synchronize, reopened ] | |
paths: | |
- "**/*.go" | |
- "go.mod" | |
- "go.sum" | |
- ".github/workflows/testing.yml" | |
- "Makefile" | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
testing: | |
name: Testing | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
go: [ "1.18", "1.19" ] | |
steps: | |
- name: Set up Go ${{ matrix.go }}.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Set up IPFS | |
uses: ibnesayeed/setup-ipfs@c779340c110024feeb46579fef211c89332caf85 | |
with: | |
ipfs_version: "0.17.0" | |
run_daemon: true | |
- name: Check out code base | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check out code base | |
if: github.event_name == 'pull_request' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Cache go module | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-go- | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
- name: Run test | |
env: | |
IPFS_PINNER_PINATA_API_KEY: ${{ secrets.IPFS_PINNER_PINATA_API_KEY }} | |
IPFS_PINNER_PINATA_SECRET_API_KEY: ${{ secrets.IPFS_PINNER_PINATA_SECRET_API_KEY }} | |
run: | | |
make test | |
make test-cover | |
- name: Upload coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-${{ matrix.os }} | |
path: coverage.* | |
- name: Run integration test | |
env: | |
IPFS_PINNER_PINATA_API_KEY: ${{ secrets.IPFS_PINNER_PINATA_API_KEY }} | |
IPFS_PINNER_PINATA_SECRET_API_KEY: ${{ secrets.IPFS_PINNER_PINATA_SECRET_API_KEY }} | |
run: make test-integration |