-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: ci | ||
on: [push, pull_request] | ||
|
||
env: | ||
XDG_CACHE_HOME: ${{ github.workspace }}/.cache | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Cache bigger downloads | ||
uses: actions/cache@v2 | ||
id: cache | ||
with: | ||
path: ${{ github.workspace }}/.cache | ||
key: ${{ runner.os }}-${{ hashFiles('package*json', '*config.js') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ hashFiles('package*json', '*config.js') }} | ||
${{ runner.os }}- | ||
- name: Install dependencies | ||
run: npm run ci:install # TODO npm ci --prefer-offline --no-audit --progress=false --cache ${{ github.workspace }}/.cache/npm | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Show build/ | ||
run: du -sh build/ && ls -l build/ | ||
|
||
- name: Test | ||
run: npm run test | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
# Persist produced binaries and effective config used for building them | ||
# - this is not for releases, but for quick testing during the dev | ||
# - action artifacts can be downloaded for 90 days, then are removed by github | ||
# - binaries in PRs from forks won't be signed | ||
- name: Attach produced packages to Github Action | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-${{ matrix.os }} | ||
path: build/ipfs_companion*.* | ||
if-no-files-found: error | ||
|
||
- name: Show Cache | ||
run: du -sh ${{ github.workspace }}/.cache/ && ls -l ${{ github.workspace }}/.cache/ | ||
|