feat: about page (#177) #316
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: Run tests | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- 'library/**' | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- 'library/**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
env: | |
CI: 'true' | |
BEE_VERSION: '1.8.2' | |
BEE_API_URL: 'http://172.18.0.1:1633' | |
BEE_DEBUG_API_URL: 'http://172.18.0.1:1635' | |
BEE_PEER_API_URL: 'http://172.18.0.1:11633' | |
BEE_PEER_DEBUG_API_URL: 'http://172.18.0.1:11635' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache node modules | |
id: cache-npm-ext | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-ext-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-ext-${{ matrix.node }}-${{ env.cache-name }}- | |
${{ runner.OS }}-ext-${{ matrix.node }}- | |
- name: Install dependencies | |
run: npm ci | |
if: steps.cache-npm-ext.outputs.cache-hit != 'true' | |
- name: Lint | |
run: npm run lint:check | |
- name: Cache Swarm extension | |
id: cache-swarm-ext | |
uses: actions/cache@v3 | |
with: | |
path: swarm-extension | |
key: ${{ runner.os }}-swarm-ext-${{ matrix.node }}-${{ hashFiles('**/swarm-extension/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-swarm-ext-${{ matrix.node }}-${{ env.cache-name }}- | |
${{ runner.OS }}-node-${{ matrix.node }}- | |
- name: Compile Swarm Extension | |
run: npm run swarm-ext:ci | |
if: steps.cache-swarm-ext.outputs.cache-hit != 'true' | |
- name: Copy configuration | |
run: cp .test.env .env | |
- name: Build | |
run: npm run build | |
- name: Install fdp-play | |
run: npm install -g @fairdatasociety/fdp-play | |
- name: Run fdp-play | |
run: fdp-play start -d --bee-version $BEE_VERSION | |
- name: Cache library node modules | |
id: cache-npm-lib | |
uses: actions/cache@v3 | |
with: | |
path: library/node_modules | |
key: ${{ runner.os }}-lib-${{ matrix.node }}-${{ hashFiles('**/library/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-lib-${{ matrix.node }}-${{ env.cache-name }}- | |
${{ runner.OS }}-lib-${{ matrix.node }}- | |
- name: Install library dependencies | |
run: cd library && npm ci && cd .. | |
if: steps.cache-npm-lib.outputs.cache-hit != 'true' | |
- name: Run tests | |
uses: vojtechsimetka/puppeteer-headful@master | |
env: | |
CI: 'true' | |
with: | |
args: npm run test:ci |