From ae823de444d340e22ae46f82c9514268ec62e046 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 14 Jun 2020 15:49:15 +0100 Subject: [PATCH] Replace Travis CI with GitHub Actions build/lint/test workflows --- .github/workflows/build.yml | 17 +++++++++++++++++ .github/workflows/docker.yml | 2 +- .github/workflows/lint.yml | 21 +++++++++++++++++++++ .github/workflows/test.yml | 17 +++++++++++++++++ .travis.yml | 8 -------- README.md | 2 +- 6 files changed, 57 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b64e57d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + uses: borales/actions-yarn@v2.0.0 + with: + cmd: install + - name: Run production build + uses: borales/actions-yarn@v2.0.0 + with: + cmd: build diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ccb6f38..781ca70 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: 'Build Docker images for multiple architectures' +name: Build Docker images on: schedule: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..2170129 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: Lint code + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + uses: borales/actions-yarn@v2.0.0 + with: + cmd: install + - name: Lint JavaScript/Vue files + uses: borales/actions-yarn@v2.0.0 + with: + cmd: lint:js + - name: Lint Markdown files + uses: borales/actions-yarn@v2.0.0 + with: + cmd: lint:md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3d7ba99 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Run tests + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + uses: borales/actions-yarn@v2.0.0 + with: + cmd: install + - name: Run unit tests + uses: borales/actions-yarn@v2.0.0 + with: + cmd: test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 564015f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 10 -cache: yarn -script: - - yarn lint:js - - yarn lint:md - - yarn test diff --git a/README.md b/README.md index 6682bc8..364b0b5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Version](https://img.shields.io/github/package-json/v/owntracks/frontend) [![Docker Pulls](https://img.shields.io/docker/pulls/owntracks/frontend)](https://hub.docker.com/r/owntracks/frontend) -[![Build Status](https://travis-ci.org/owntracks/frontend.svg?branch=master)](https://travis-ci.org/owntracks/frontend) +[![Build](https://github.com/owntracks/frontend/workflows/Build/badge.svg)](https://github.com/owntracks/frontend/actions) [![License](https://img.shields.io/github/license/owntracks/frontend?color=d63e97)](https://github.com/owntracks/frontend/blob/master/LICENSE) ![OwnTracks UI](https://raw.githubusercontent.com/owntracks/frontend/master/docs/images/owntracks-ui.png)