Skip to content

Commit

Permalink
ci: Set up github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Jan 12, 2022
1 parent d10a9b5 commit eaf15ee
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 36 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/core.yml
@@ -0,0 +1,85 @@
name: Core
on:
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
name: Test ${{ matrix.os }}/Node ${{ matrix.node }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
node:
- 16
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install deps
run: yarn install --check-files
- name: Typecheck
run: yarn run typecheck
- name: Lint
run: yarn run tslint
- name: Test
run: yarn test --forbid-only --forbid-pending
- name: Upload coverage
if: ${{ matrix.os != 'windows-latest' }}
continue-on-error: true
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: node-${{ matrix.node }}-on-${{ matrix.os }}-${{ github.event_name }}
# parallel: true
# posttest:
# runs-on: ubuntu-latest
# needs: test
# continue-on-error: true
# steps:
# - name: Finalise coverage report
# uses: coverallsapp/github-action@v1.1.2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true
release:
name: Release
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
needs:
# - lint
- test
strategy:
matrix:
os:
- ubuntu-latest
node:
- 16
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1000
- uses: actions/setup-node@v2
name: Set up node
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install deps
run: yarn install --check-files
- name: Build
run: yarn run build
- name: Copy files
run: ./node_modules/.bin/alo copy-files
- name: Release
run: ./node_modules/.bin/semantic-release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 3 additions & 3 deletions .releaserc.yml
Expand Up @@ -13,11 +13,11 @@ prepare:
- path: &exec '@semantic-release/exec'
cmd: yarn run doctoc
- path: *exec
cmd: alo copy-files
cmd: ./node_modules/.bin/alo copy-files
- path: *exec
cmd: alo clean-dist
cmd: ./node_modules/.bin/alo clean-dist
- path: *exec
cmd: alo clean-pkg-json
cmd: ./node_modules/.bin/alo clean-pkg-json
- path: '@semantic-release/git'
message: 'chore(release): ${nextRelease.version}'
assets:
Expand Down
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

0 comments on commit eaf15ee

Please sign in to comment.