Skip to content

Commit 487324b

Browse files
committed
chore: switch to unified ci
Switches to auto-release
1 parent 773032c commit 487324b

File tree

6 files changed

+186
-178
lines changed

6 files changed

+186
-178
lines changed
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: test & maybe release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: lts/*
19+
- uses: ipfs/aegir/actions/cache-node-modules@master
20+
- run: npm run --if-present lint
21+
- run: npm run --if-present dep-check
22+
23+
test-node:
24+
needs: check
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
matrix:
28+
os: [windows-latest, ubuntu-latest, macos-latest]
29+
node: [16]
30+
fail-fast: true
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: actions/setup-node@v2
34+
with:
35+
node-version: ${{ matrix.node }}
36+
- uses: ipfs/aegir/actions/cache-node-modules@master
37+
- run: npm run --if-present test:node
38+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
39+
with:
40+
directory: ./.nyc_output
41+
flags: node
42+
43+
test-chrome:
44+
needs: check
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: actions/setup-node@v2
49+
with:
50+
node-version: lts/*
51+
- uses: ipfs/aegir/actions/cache-node-modules@master
52+
- run: npm run --if-present test:chrome
53+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
54+
with:
55+
directory: ./.nyc_output
56+
flags: chrome
57+
58+
test-chrome-webworker:
59+
needs: check
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v2
63+
- uses: actions/setup-node@v2
64+
with:
65+
node-version: lts/*
66+
- uses: ipfs/aegir/actions/cache-node-modules@master
67+
- run: npm run --if-present test:chrome-webworker
68+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
69+
with:
70+
directory: ./.nyc_output
71+
flags: chrome-webworker
72+
73+
test-firefox:
74+
needs: check
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v2
78+
- uses: actions/setup-node@v2
79+
with:
80+
node-version: lts/*
81+
- uses: ipfs/aegir/actions/cache-node-modules@master
82+
- run: npm run --if-present test:firefox
83+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
84+
with:
85+
directory: ./.nyc_output
86+
flags: firefox
87+
88+
test-firefox-webworker:
89+
needs: check
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: actions/checkout@v2
93+
- uses: actions/setup-node@v2
94+
with:
95+
node-version: lts/*
96+
- uses: ipfs/aegir/actions/cache-node-modules@master
97+
- run: npm run --if-present test:firefox-webworker
98+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
99+
with:
100+
directory: ./.nyc_output
101+
flags: firefox-webworker
102+
103+
test-electron-main:
104+
needs: check
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v2
108+
- uses: actions/setup-node@v2
109+
with:
110+
node-version: lts/*
111+
- uses: ipfs/aegir/actions/cache-node-modules@master
112+
- run: npx xvfb-maybe npm run --if-present test:electron-main
113+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
114+
with:
115+
directory: ./.nyc_output
116+
flags: electron-main
117+
118+
test-electron-renderer:
119+
needs: check
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@v2
123+
- uses: actions/setup-node@v2
124+
with:
125+
node-version: lts/*
126+
- uses: ipfs/aegir/actions/cache-node-modules@master
127+
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
128+
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
129+
with:
130+
directory: ./.nyc_output
131+
flags: electron-renderer
132+
133+
release:
134+
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
135+
runs-on: ubuntu-latest
136+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
137+
steps:
138+
- uses: actions/[email protected]
139+
with:
140+
fetch-depth: 0
141+
- uses: actions/setup-node@v2
142+
with:
143+
node-version: lts/*
144+
- uses: ipfs/aegir/actions/cache-node-modules@master
145+
- uses: ipfs/aegir/actions/docker-login@master
146+
with:
147+
docker-token: ${{ secrets.DOCKER_TOKEN }}
148+
docker-username: ${{ secrets.DOCKER_USERNAME }}
149+
- run: npm run --if-present release
150+
env:
151+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/main.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/typecheck.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# ipfs-bitswap
1+
# ipfs-bitswap <!-- omit in toc -->
22

33
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
44
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
55
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6-
[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-bitswap)](https://travis-ci.com/ipfs/js-ipfs-bitswap)
6+
[![Build Status](https://github.com/ipfs/js-ipfs-bitswap/actions/workflows/js-test-and-release.yml/badge.svg?branch=master)](https://github.com/ipfs/js-ipfs-bitswap/actions/workflows/js-test-and-release.yml)
77
[![](https://coveralls.io/repos/github/ipfs/js-ipfs-bitswap/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-bitswap?branch=master)
88
[![](https://david-dm.org/ipfs/js-ipfs-bitswap.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-bitswap)
99
[![](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
@@ -13,30 +13,23 @@
1313

1414
> JavaScript implementation of the Bitswap 'data exchange' protocol used by IPFS
1515
16-
## Lead Maintainer
17-
18-
[Dirk McCormick](https://github.com/dirkmc)
19-
20-
## Table of Contents
21-
22-
- [ipfs-bitswap](#ipfs-bitswap)
23-
- [Lead Maintainer](#lead-maintainer)
24-
- [Table of Contents](#table-of-contents)
25-
- [Install](#install)
26-
- [npm](#npm)
27-
- [Use in Node.js or in the browser with browserify, webpack or any other bundler](#use-in-nodejs-or-in-the-browser-with-browserify-webpack-or-any-other-bundler)
28-
- [Use in a browser using a script tag](#use-in-a-browser-using-a-script-tag)
29-
- [API](#api)
30-
- [Stats](#stats)
31-
- [Peer accessor:](#peer-accessor)
32-
- [Global snapshot accessor:](#global-snapshot-accessor)
33-
- [Moving average accessor:](#moving-average-accessor)
34-
- [Development](#development)
35-
- [Structure](#structure)
36-
- [Performance tests](#performance-tests)
37-
- [Profiling](#profiling)
38-
- [Contribute](#contribute)
39-
- [License](#license)
16+
## Table of Contents <!-- omit in toc -->
17+
18+
- [Install](#install)
19+
- [npm](#npm)
20+
- [Use in Node.js or in the browser with browserify, webpack or any other bundler](#use-in-nodejs-or-in-the-browser-with-browserify-webpack-or-any-other-bundler)
21+
- [Use in a browser using a script tag](#use-in-a-browser-using-a-script-tag)
22+
- [API](#api)
23+
- [Stats](#stats)
24+
- [Peer accessor:](#peer-accessor)
25+
- [Global snapshot accessor:](#global-snapshot-accessor)
26+
- [Moving average accessor:](#moving-average-accessor)
27+
- [Development](#development)
28+
- [Structure](#structure)
29+
- [Performance tests](#performance-tests)
30+
- [Profiling](#profiling)
31+
- [Contribute](#contribute)
32+
- [License](#license)
4033

4134
## Install
4235

maintainer.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)