Skip to content

Commit

Permalink
Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fstirlitz committed May 31, 2021
1 parent 5015784 commit 24840d1
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 43 deletions.
39 changes: 39 additions & 0 deletions .github/upload-key.id_rsa
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABC7v7wTRG
0X12QigBYhN1VqAAAAEAAAAAEAAAGXAAAAB3NzaC1yc2EAAAADAQABAAABgQDWB7J+7gsf
iAJg+B7DhNSLAF2qoDIEYaSGjHyeO4qb+Rulf0McEsyM19jFuC+ZFyGe3F8h4Aqudmhj+M
j7LyNZH0Pc5CLI9hG6hIVJ1h3okLUjv0wl1SkiP5LUMX66Sq+xNTXlZO+TwjNu0SMo/scY
d5Vq6ROcfG0qTA6vVD0Zhg5m0Pagat8AWE177QWyLUE+eCbkcNaxSSb10UVqOQzx9njmM3
MrMVBAPTu2vHNgFuFpuRtfLUM1wP7/fuQRzI94XwaDWcHnKPQ260zLGhF4iEnaTep1CVME
PuiH4O6EjADnGjYU+E7ZmGZCswUXP2pB8kPc5/IwXvI4Ig2b0aLwEHGCJjyVysroX8zMGT
dcrwnrD8EBRR2qp32TP2TbVj1+Q73euRGYqTwORupyD3Drn0D5+OfAIHxybM/rN918cMm7
1tAHqTaJ+EKaEKdOvgYdFsKh81PdDioKVsdXZHT/e32GdSNyLLQ3X3ixfI4m9HhMtRWJWs
eiSzC0YuyD9v8AAAWQY/nE1nbgxehIvUhGWSNEBKMvktMzx9gofNilzFZwAU/a9sYu+muB
m2rwUzUD/8Qw4x0il5xsiFa1zSwO8pQhN7llcHNGtxECLsKV7a3MbA/lY15SWiMEtSrjM8
e5wCHCBkwkcQZmKq8H4YFLJ5REZKZQ8zFpFHO1O+VgYvF1cJyle+QqqGGT3Bc/OS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ad2XlJZZ+y1dc7EvBUH/Hef3ZLzpxab1YoAZ9O9Rurd5VhZdjAO
3Yfthd8vtwu9DKO0ZeS9NirqWEbtVNFurXdhL+jkmUVL50jEGMgn8BX+N1llsREXT7DeGX
X4wNCm/FrJd+onnPRN3JRdAs3iI2pghWSD8/Ao47m+lxNHsIxPDf+fFr+mH+XRNLe4Cp9B
e0zyWog4YT3rN3ZqovZR9B+hXjdturuEUSDPaeOcHXeTmLtL4tMoEb1S/i4L2FOG8Rr+V5
gHkuOw81F2u16Q4UdwdgobSIHuAg5ky9zBAvoZKnttRqicaLM1XhwlX1QsXzZTOBeECZtW
Xpu1VFR0CwsDTxTH0oegTAq1Ndzo86rhDbV8QkffboxLAw78dXKqVTNHBlR4Nv1I7CAWDS
sm+X85vdX91dvp7ZnAx7/jCTd15j/66X3k+hgNCGYvioW05HMWdqQzuL5h6+DQ4ZRNmu7f
musSnvpycKBn5bxpqIeE3okil3S64KeNhm7GbofMmN0zHSlxR8xqlBX2Ne6oXtoX00yXB5
v0d5ovx8TlZo4sVGMUlGFci72y8THk9j1/Du159uEPSUCHNir/K89mtCr8mgidWNmc3/ir
ioU8U7ImPuL8ebn6kNQccW/0nfg=
-----END OPENSSH PRIVATE KEY-----
153 changes: 153 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: CI

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

jobs:
lint:
name: Linter
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 15.x
uses: actions/setup-node@v2
with:
node-version: 15.x
- run: npm ci
- run: make lint complexity-analysis

run-tests:
name: Testsuite
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
include:
- engine: ringojs
version: 2.0.0
- engine: rhino
version: 1.7.13
- engine: quickjs
version: '2020-09-06'
- engine: quickjs
version: '2020-11-08'
- engine: quickjs
version: '2021-03-27'
- engine: node.js
version: 10.x
- engine: node.js
version: 12.x
- engine: node.js
version: 14.x
- engine: node.js
version: 15.x
- engine: duktape
version: 2.4.0
- engine: duktape
version: 2.5.0
- engine: duktape
version: 2.6.0

steps:
- uses: actions/checkout@v2

# Duktape
- name: Install Duktape ${{ matrix.version }}
if: ${{ matrix.engine == 'duktape' }}
run: |
PACKAGE="duktape-${{ matrix.version }}"
cd /opt
wget "https://duktape.org/$PACKAGE.tar.xz"
tar xf "$PACKAGE.tar.xz"
make -C "$PACKAGE/" -f Makefile.cmdline DEFINES=-DDUK_CMDLINE_FILEIO
sudo install -Dm755 "$PACKAGE/duk" /usr/local/bin/duk
rm -rf "$PACKAGE.tar.xz" "$PACKAGE/"
- name: Run tests
if: ${{ matrix.engine == 'duktape' }}
run: cd test; duk runner.js

# Node.js
- name: Install Node.js ${{ matrix.version }}
if: ${{ matrix.engine == 'node.js' }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.version }}
- run: node test/runner.js --console
if: ${{ matrix.engine == 'node.js' }}

# QuickJS
- name: Install QuickJS ${{ matrix.version }}
if: ${{ matrix.engine == 'quickjs' }}
run: |
cd /opt
git clone --bare 'https://gitlab.com/felix.s-git-mirrors/quickjs.git'
git --git-dir=quickjs.git worktree add quickjs "${{ matrix.version }}"
make -C quickjs qjs
sudo install -Dm755 quickjs/qjs /usr/local/bin/qjs
rm -rf quickjs.git quickjs
- name: Run tests
if: ${{ matrix.engine == 'quickjs' }}
# XXX: The default QuickJS stack size limit is 256 KiB;
# QuickJS likes to throw stack overflow errors when running the test suite at that limit,
# so we increase it to 8 MiB. The issue is intermittent and non-deterministic;
# it may or may not be an engine bug
run: cd test; qjs --stack-size 8388608 --std runner.js

# Rhino
- name: Download Rhino ${{ matrix.version }}
if: ${{ matrix.engine == 'rhino' }}
run: |
VERSION="${{ matrix.version }}"
wget "https://github.com/mozilla/rhino/releases/download/Rhino${VERSION//./_}_Release/rhino-$VERSION.jar" -O /opt/rhino.jar
- name: Run tests
if: ${{ matrix.engine == 'rhino' }}
run: cd test; java -jar /opt/rhino.jar -opt -1 runner.js

# RingoJS
- name: Download and unpack RingoJS ${{ matrix.version }}
if: ${{ matrix.engine == 'ringojs' }}
run: |
VERSION="${{ matrix.version }}"
wget "https://github.com/ringo/ringojs/releases/download/v${VERSION}/ringojs-${VERSION}.zip"
unzip "ringojs-${VERSION}.zip" -d /opt/
rm "ringojs-${VERSION}.zip"
- name: Install RingoJS ${{ matrix.version }}
if: ${{ matrix.engine == 'ringojs' }}
run: |
VERSION="${{ matrix.version }}"
sed -i -e '/-jar/ i \ -Dringo.classpath="$RINGO_HOME/lib/**" \\' "/opt/ringojs-${VERSION}/bin/ringo"
sudo ln -s "/opt/ringojs-${VERSION}/bin/ringo" /usr/local/bin/ringo
sudo chmod +x /usr/local/bin/ringo
- name: Run tests
if: ${{ matrix.engine == 'ringojs' }}
run: ringo -o -1 test/runner.js 2>&1

check-coverage:
name: Coverage analysis
needs: run-tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: npm ci
- run: make coverage-analysis

update-docs:
name: Update documentation
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }}
needs: check-coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: |
git clone --depth=1 --branch gh-pages [email protected]:fstirlitz/luaparse.git gh-pages
cd gh-pages
make
git add .
git commit --message "build documentation"
git push origin gh-pages
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Upload release

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm ci
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

Binary file removed .travis/deploy_key.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# luaparse [![Build Status](https://travis-ci.org/fstirlitz/luaparse.svg?branch=master)](https://travis-ci.org/fstirlitz/luaparse)
# luaparse

A Lua parser written in JavaScript, originally written by Oskar Schöldström for his bachelor's thesis at Arcada.

Expand Down

0 comments on commit 24840d1

Please sign in to comment.