Skip to content

Commit 3603296

Browse files
authored
Add GitHub Actions workflows (#707)
* Add GitHub Actions workflows * Rename 'Continuous Integration' workflow to 'CI' * Run Lint job on latest node * Change release workflow event filter to `tags` * Update setup-node action version parameter name
1 parent de818bc commit 3603296

File tree

6 files changed

+66
-53
lines changed

6 files changed

+66
-53
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
- run: npm install --global npm@6
14+
- run: npm ci
15+
- run: npm run lint
16+
env:
17+
CI: true
18+
19+
test:
20+
name: Test on ${{ matrix.os }}
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
matrix:
24+
os: [ubuntu-latest, windows-latest]
25+
26+
steps:
27+
- uses: actions/checkout@v1
28+
- name: Use Node.js 8.5.0
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: 8.5.0
32+
- run: npm install --global npm@6
33+
- run: npm ci
34+
- run: npm run build
35+
- run: npx jest --coverage
36+
env:
37+
CI: true
38+
- if: matrix.os == 'ubuntu-latest'
39+
continue-on-error: true
40+
uses: codecov/codecov-action@v1.0.0
41+
with:
42+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: "*"
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: actions/setup-node@v1
15+
- run: npm install --global npm@6
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm publish --dry-run
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ module.exports = {
66
tabWidth: 4,
77
trailingComma: "es5",
88
endOfLine: isCI ? "lf" : "auto",
9-
overrides: [{ files: ["**/*.md", "**/*.yml", "**/.*.yml"], options: { tabWidth: 2 } }],
9+
overrides: [{ files: ["**/*.md", "**/*.yml"], options: { tabWidth: 2 } }],
1010
};

.travis.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
<h1>
44
TypeScriptToLua
55
<p></p>
6-
<a href="https://travis-ci.org/TypeScriptToLua/TypeScriptToLua"><img alt="Build status" src="https://img.shields.io/travis/TypeScriptToLua/TypeScriptToLua/master.svg?style=for-the-badge" /></a>
7-
<a href="https://ci.appveyor.com/project/Perryvw/typescripttolua-pa0ym"><img alt="Build status" src="https://img.shields.io/appveyor/ci/Perryvw/typescripttolua-pa0ym/master.svg?logo=appveyor&style=for-the-badge" /></a>
8-
<a href="https://codecov.io/gh/TypeScriptToLua/typescripttolua"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/TypeScriptToLua/typescripttolua.svg?logo=codecov&style=for-the-badge" /></a>
9-
<a href="https://discord.gg/BWAq58Y"><img alt="Chat with us!" src="https://img.shields.io/discord/515854149821267971.svg?style=for-the-badge&colorB=7581dc&logo=discord&logoColor=white"></a>
6+
<a href="https://github.com/TypeScriptToLua/TypeScriptToLua/actions"><img alt="Continuous Integration status" src="https://github.com/TypeScriptToLua/TypeScriptToLua/workflows/Continuous%20Integration/badge.svg" /></a>
7+
<a href="https://codecov.io/gh/TypeScriptToLua/TypeScriptToLua"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/TypeScriptToLua/TypeScriptToLua.svg?logo=codecov" /></a>
8+
<a href="https://discord.gg/BWAq58Y"><img alt="Chat with us!" src="https://img.shields.io/discord/515854149821267971.svg?colorB=7581dc&logo=discord&logoColor=white"></a>
109
</h1>
1110
</div>
1211

appveyor.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)