From 7853ec2acb8edb6051cf3ed75abd73bb31ddbdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Herrera=20Guzm=C3=A1n?= Date: Wed, 11 Sep 2019 13:39:31 +0200 Subject: [PATCH] ci(github): remove workflow before deprecation and improve current --- .github/main.workflow | 67 ------------------------------------ .github/workflows/main.yml | 28 +++++++++++++++ .github/workflows/nodejs.yml | 28 --------------- 3 files changed, 28 insertions(+), 95 deletions(-) delete mode 100644 .github/main.workflow create mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index 2986720..0000000 --- a/.github/main.workflow +++ /dev/null @@ -1,67 +0,0 @@ -################################################ -# Workflow for a github release when a tag is -# pushed -################################################ -workflow "github release" { - resolves = [ - "release.github", - "release.lint", - ] - on = "push" -} - -action "release.filter" { - uses = "actions/bin/filter@master" - args = "tag v*" -} - -action "release.install" { - uses = "docker://node:10" - needs = ["release.filter"] - args = "yarn install" -} - -action "release.build" { - uses = "docker://node:10" - needs = ["release.install"] - args = "yarn run build" -} - -action "release.lint" { - uses = "docker://node:10" - needs = ["release.install"] - args = "yarn run lint" -} - -action "release.test" { - uses = "docker://node:10" - needs = ["release.build"] - args = "yarn run test" -} - -action "release.auth" { - needs = ["release.test"] - uses = "actions/bin/filter@master" - args = ["actor", "octocat", "torvalds"] -} - -action "release.npm.publish" { - needs = ["release.auth"] - uses = "docker://node:10" - args = "sh scripts/publish.sh" - secrets = [ - "REGISTRY_AUTH_TOKEN", - ] - env = { - REGISTRY_URL = "registry.npmjs.org" - } -} - -action "release.github" { - needs = ["release.npm.publish"] - uses = "docker://node:10" - args = "sh scripts/github-release.sh" - secrets = [ - "GITHUB_TOKEN", - ] -} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b014ade --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: CI + +on: push + +jobs: + build_test_lint: + name: Node ${{ matrix.node_version }} and ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + node_version: ['8.16', 10, 12] # Node 8 version fix due to https://github.com/actions/setup-node/issues/27 + os: [ubuntu-latest, windows-latest, macOS-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + version: ${{ matrix.node_version }} + - name: Install + run: yarn install --frozen-lockfile + - name: Build + run: yarn build + - name: Lint + run: yarn lint diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 21164cb..0000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Node CI - -on: [push] - -jobs: - ci: - name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: [8, 10, 12] - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node_version }} - uses: actions/setup-node@v1 - with: - version: ${{ matrix.node_version }} - - - name: Use Yarn 1.17.2 - run: | - npm install -g yarn@1.17.2 - - name: yarn build - run: | - yarn install - yarn lint - yarn build