From 6f8ec6f58a05de2fdefe9600a866da438302404a Mon Sep 17 00:00:00 2001 From: ark120202 Date: Mon, 26 Aug 2019 13:59:59 +0500 Subject: [PATCH 1/5] Add GitHub Actions workflows --- .github/workflows/continuous-integration.yml | 45 ++++++++++++++++++++ .github/workflows/release.yml | 24 +++++++++++ .prettierrc.js | 2 +- .travis.yml | 17 -------- README.md | 7 ++- appveyor.yml | 31 -------------- 6 files changed, 73 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/continuous-integration.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 000000000..bb7d391bf --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,45 @@ +name: Continuous Integration + +on: [push, pull_request] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 8.5.0 + uses: actions/setup-node@v1 + with: + version: 8.5.0 + - run: npm install --global npm@6 + - run: npm ci + - run: npm run lint + env: + CI: true + + test: + name: Test on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 8.5.0 + uses: actions/setup-node@v1 + with: + version: 8.5.0 + - run: npm install --global npm@6 + - run: npm ci + - run: npm run build + - run: npx jest --coverage + env: + CI: true + - if: matrix.os == 'ubuntu-latest' + continue-on-error: true + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..a58ad83a7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + push: + # TODO: tags: '*' triggers on any commit + branches: refs/tags/* + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js 8.5.0 + uses: actions/setup-node@v1 + with: + version: 8.5.0 + - run: npm install --global npm@6 + - run: npm ci + - run: npm run build + - run: npm publish --dry-run + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.prettierrc.js b/.prettierrc.js index 87974397e..e9fb0b291 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -6,5 +6,5 @@ module.exports = { tabWidth: 4, trailingComma: "es5", endOfLine: isCI ? "lf" : "auto", - overrides: [{ files: ["**/*.md", "**/*.yml", "**/.*.yml"], options: { tabWidth: 2 } }], + overrides: [{ files: ["**/*.md", "**/*.yml"], options: { tabWidth: 2 } }], }; diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e75d82b40..000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -node_js: "8.5.0" - -script: - - npm run build - - npm test -- --coverage -after_success: npx codecov - -deploy: - provider: npm - email: lorenz.junglas@student.kit.edu - skip_cleanup: true - api_key: - secure: zXFXK1GohutgqKXQ101uKcJKcf0wgCuVPFMY44Xl/JwXeLsA1CJ4aqUdoXh2ramcI+9wTVj7RR3N3/7W+2DeDCfUlj+gxw26pTV3EUnU2B1TXEz01Ar07WPHmhHJSS5tgyo9kPUqm/YBFkJuDtfx0Kp3sL6IRYDddvGv/2L1X8r3I14PxgppkU9T4FGINdClOEwfwelmxx3kjxpnTsUHZ+ztx7o+blteSf/r+pT1RDaIap80JaTy6vHwJKECRSvtpyTKEYeVmBIaA3yXqRhfMdlp8bU20t2DXoDGXWPk0GXRGXkVHE6yj64gPe/eOOesAxzv0v/vr5w4poemJ+SGwP3RSbrbVtiusD4FC6+hFBH7hiNUhxww5euvbAfNOTq2XyxtjcNmKB5/O675xGihK1gBgrsPdJ4enwkhQNrUuQBHm5wIKGiaH7t7q+T8W9JAnk3FGGuSZPg9b7AnFDQ3graxZK9mtOxi0GvE7DHinH6qErd4noGjS/KSy1fnDkCEkeplOQmvxb4w7wLMR5pePFc77NBXiR3RJDKh4QKskcvXPx58OWNffTkS2QwYPYhraNNKbUfGFBNEA4KPNmw1jYlDE/1BhOebmONpZQMP/CdcCWL+CKyTdi1/289Ak4B0iSZZN+Yx+AONzPlcvBVi+bXeXtqoIt2zMFKkr/0YFQg= - on: - tags: true - repo: TypeScriptToLua/TypeScriptToLua diff --git a/README.md b/README.md index 5fff008ac..ad83fb83e 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,9 @@

TypeScriptToLua

- Build status - Build status - Coverage - Chat with us! + Continuous Integration status + Coverage + Chat with us!

diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5e5b29138..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Test against the latest version of this Node.js version -environment: - nodejs_version: "8.5.0" - -# Do not build feature branch with open Pull Requests -skip_branch_with_pr: true - -# Cache dependencies -cache: - - node_modules - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version - # Upgrade npm - - npm install --global npm@6 - # Install modules - - npm ci - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # Run tests - - npm run build - - npm test - -# Don't actually build. -build: off From dfc501c02275f9b121d5f7d4fcde70fc25ea3e24 Mon Sep 17 00:00:00 2001 From: ark120202 Date: Mon, 30 Sep 2019 08:13:26 +0500 Subject: [PATCH 2/5] Rename 'Continuous Integration' workflow to 'CI' --- .github/workflows/{continuous-integration.yml => ci.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{continuous-integration.yml => ci.yml} (97%) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/ci.yml similarity index 97% rename from .github/workflows/continuous-integration.yml rename to .github/workflows/ci.yml index bb7d391bf..8047df066 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: CI on: [push, pull_request] From 63e7aa497d7cf11d5d10f77e66ef21fba43b4b42 Mon Sep 17 00:00:00 2001 From: ark120202 Date: Mon, 30 Sep 2019 18:03:59 +0500 Subject: [PATCH 3/5] Run Lint job on latest node --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8047df066..988025f20 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,10 +9,7 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Use Node.js 8.5.0 - uses: actions/setup-node@v1 - with: - version: 8.5.0 + - uses: actions/setup-node@v1 - run: npm install --global npm@6 - run: npm ci - run: npm run lint From 5856ce52d1febf19aaf2a269a3b0cd21cf5ed964 Mon Sep 17 00:00:00 2001 From: ark120202 Date: Sun, 6 Oct 2019 23:31:58 +0500 Subject: [PATCH 4/5] Change release workflow event filter to `tags` --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a58ad83a7..dde9b9fa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,7 @@ name: Release on: push: - # TODO: tags: '*' triggers on any commit - branches: refs/tags/* + tags: "*" jobs: release: From a573b375b80bcd42aa63fbd42efb5917eca97bce Mon Sep 17 00:00:00 2001 From: ark120202 Date: Sun, 6 Oct 2019 23:40:45 +0500 Subject: [PATCH 5/5] Update setup-node action version parameter name --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 988025f20..645444dc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Use Node.js 8.5.0 uses: actions/setup-node@v1 with: - version: 8.5.0 + node-version: 8.5.0 - run: npm install --global npm@6 - run: npm ci - run: npm run build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dde9b9fa5..b344325aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,10 +11,7 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Use Node.js 8.5.0 - uses: actions/setup-node@v1 - with: - version: 8.5.0 + - uses: actions/setup-node@v1 - run: npm install --global npm@6 - run: npm ci - run: npm run build