-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: port CircleCI to GH Actions and improve sharness reporting (#9355)
- Loading branch information
Showing
30 changed files
with
708 additions
and
380 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
name: 'ci/gh-experiment: interop' | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
GO_VERSION: 1.19.1 | ||
|
||
jobs: | ||
prepare: | ||
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_NO_DOCKER: 1 | ||
TEST_NO_FUSE: 1 | ||
TEST_VERBOSE: 1 | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: actions/checkout@v3 | ||
- uses: protocol/cache-go-action@v1 | ||
with: | ||
name: ${{ github.job }} | ||
- run: make build | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: kubo | ||
path: cmd/ipfs/ipfs | ||
ipfs-interop: | ||
needs: [prepare] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
suites: | ||
- 'exchange-files' | ||
- 'files pin circuit ipns cid-version-agnostic ipns-pubsub pubsub' | ||
fail-fast: false | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.12.0 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: kubo | ||
path: cmd/ipfs | ||
- run: chmod +x cmd/ipfs/ipfs | ||
- run: | | ||
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | ||
id: npm-cache-dir | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ github.job }}- | ||
- run: mkdir interop | ||
- run: | | ||
npm init -y | ||
npm install ipfs@^0.61.0 | ||
npm install ipfs-interop@^8.0.10 | ||
working-directory: interop | ||
- run: npx ipfs-interop -- -t node $(sed -e 's#[^ ]*#-f test/&.js#g' <<< '${{ matrix.suites }}') | ||
env: | ||
LIBP2P_TCP_REUSEPORT: false | ||
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1 | ||
IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs | ||
working-directory: interop | ||
go-ipfs-api: | ||
needs: [prepare] | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_NO_DOCKER: 1 | ||
TEST_NO_FUSE: 1 | ||
TEST_VERBOSE: 1 | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: kubo | ||
path: cmd/ipfs | ||
- run: chmod +x cmd/ipfs/ipfs | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ipfs/go-ipfs-api | ||
path: go-ipfs-api | ||
- run: cmd/ipfs/ipfs daemon --init --enable-namesys-pubsub & | ||
- run: | | ||
while ! cmd/ipfs/ipfs id --api=/ip4/127.0.0.1/tcp/5001 2>/dev/null; do | ||
sleep 1 | ||
done | ||
timeout-minutes: 5 | ||
- uses: protocol/cache-go-action@v1 | ||
with: | ||
name: ${{ github.job }} | ||
- run: go test -count=1 -v ./... | ||
working-directory: go-ipfs-api | ||
- run: cmd/ipfs/ipfs shutdown | ||
if: always() | ||
go-ipfs-http-client: | ||
needs: [prepare] | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_NO_DOCKER: 1 | ||
TEST_NO_FUSE: 1 | ||
TEST_VERBOSE: 1 | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: kubo | ||
path: cmd/ipfs | ||
- run: chmod +x cmd/ipfs/ipfs | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ipfs/go-ipfs-http-client | ||
path: go-ipfs-http-client | ||
- uses: protocol/cache-go-action@v1 | ||
with: | ||
name: ${{ github.job }} | ||
- run: echo '${{ github.workspace }}/cmd/ipfs' >> $GITHUB_PATH | ||
- run: go test -count=1 -v ./... | ||
working-directory: go-ipfs-http-client | ||
ipfs-webui: | ||
needs: [prepare] | ||
runs-on: ubuntu-latest | ||
env: | ||
NO_SANDBOX: true | ||
LIBP2P_TCP_REUSEPORT: false | ||
LIBP2P_ALLOW_WEAK_RSA_KEYS: 1 | ||
E2E_IPFSD_TYPE: go | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.12.0 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: kubo | ||
path: cmd/ipfs | ||
- run: chmod +x cmd/ipfs/ipfs | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ipfs/ipfs-webui | ||
path: ipfs-webui | ||
- run: | | ||
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | ||
id: npm-cache-dir | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ github.job }}- | ||
- run: | | ||
npm ci --prefer-offline --no-audit --progress=false | ||
npx playwright install | ||
working-directory: ipfs-webui | ||
- name: Run ipfs-webui@main build and smoke-test to confirm the upstream repo is not broken | ||
run: npm test | ||
working-directory: ipfs-webui | ||
- name: Test ipfs-webui@main E2E against the locally built Kubo binary | ||
run: npm run test:e2e | ||
env: | ||
IPFS_GO_EXEC: ${{ github.workspace }}/cmd/ipfs/ipfs | ||
working-directory: ipfs-webui |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'ci/gh-experiment: docker-build' | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
docker-build: | ||
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ipfs/kubo | ||
WIP_IMAGE_TAG: wip | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19.1 | ||
- uses: actions/checkout@v3 | ||
- run: docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG . |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: 'ci/gh-experiment: go build' | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
runner: | ||
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch' | ||
uses: ipfs/kubo/.github/workflows/runner.yml@ci/move-to-github-actions # TODO: change to master | ||
gobuild: | ||
needs: [runner] | ||
runs-on: ${{ fromJSON(needs.runner.outputs.config).labels }} | ||
env: | ||
TEST_NO_DOCKER: 1 | ||
TEST_VERBOSE: 1 | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19.1 | ||
- uses: actions/checkout@v3 | ||
- uses: protocol/cache-go-action@v1 | ||
with: | ||
name: ${{ github.job }} | ||
- run: make cmd/ipfs-try-build | ||
env: | ||
TEST_NO_FUSE: 0 | ||
- run: make cmd/ipfs-try-build | ||
env: | ||
TEST_NO_FUSE: 1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'ci/gh-experiment: go lint' | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
golint: | ||
if: github.repository == 'ipfs/kubo' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_NO_DOCKER: 1 | ||
TEST_NO_FUSE: 1 | ||
TEST_VERBOSE: 1 | ||
TRAVIS: 1 | ||
GIT_PAGER: cat | ||
IPFS_CHECK_RCMGR_DEFAULTS: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19.1 | ||
- uses: actions/checkout@v3 | ||
- uses: protocol/cache-go-action@v1 | ||
with: | ||
name: ${{ github.job }} | ||
- run: make -O test_go_lint |
Oops, something went wrong.