Skip to content

Commit

Permalink
Use Github Actions for CI (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnyp authored Jan 5, 2021
1 parent 05b1e6c commit 5b4849f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 35 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: |
${{github.workspace}}/node_modules
${{github.workspace}}/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install prosody
run: |
sudo apt-get update
sudo apt-get -y install prosody lua-bitop lua-sec
sudo service prosody stop
- run: make
- run: make test-ci

- name: The job has failed
if: ${{ failure() }}
run: cat server/prosody.err
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ size:

cert:
cd server && openssl req -new -x509 -days 365 -nodes -out "localhost.crt" -newkey rsa:2048 -keyout "localhost.key" -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost"

ncu:
ncu && yarn lerna exec ncu
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"bootstrap": "lerna bootstrap",
"test": "ava",
"lint": "eslint .",
"preversion": "make bundle",
"ncu": "ncu && for dir in packages/*; do (cd \"$dir\" && ncu); done"
"preversion": "make bundle"
},
"engines": {
"node": ">= 12.4.0",
Expand Down

0 comments on commit 5b4849f

Please sign in to comment.