summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-09 21:35:24 +1000
committerGitHub <noreply@github.com>2020-03-09 21:35:24 +1000
commite183d7499e4568a31b595e946eaa145356f436ce (patch)
tree6f8eb047f703cc226bb3d77639acdc9beea3e258
parent550f3078a3be9bb8c1ac6cf9f99905dcc2b3c7cc (diff)
Migrate Travis based checks to Github Actions (#8329)
* Migrate Travis based checks to Github Actions * Remove Gitlab CI config * Remove ./build/build.sh and use simple shell to do consistency checks on Dashbaord JS * Install prereq deps * Rename job * Fix brain fart momemt * Split Dashboard checks into a separate job
-rw-r--r--.github/workflows/checks.yml39
-rw-r--r--.gitlab-ci.yml19
-rw-r--r--.travis.yml17
-rwxr-xr-xbuild/build.sh20
4 files changed, 39 insertions, 56 deletions
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
new file mode 100644
index 0000000000..6e379d12e3
--- /dev/null
+++ b/.github/workflows/checks.yml
@@ -0,0 +1,39 @@
+---
+name: Checks
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+jobs:
+ checksum-checks:
+ name: Checksums
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - name: Run checksum checks on kickstart files
+ env:
+ LOCAL_ONLY: "true"
+ run: |
+ ./tests/installer/checksums.sh
+ dashboard-checks:
+ name: Dashboard
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git clone repository
+ uses: actions/checkout@v2
+ - name: Install required packages
+ run: |
+ ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
+ - name: Backup dashboard.js
+ run: |
+ cp web/gui/dashboard.js /tmp/dashboard.js
+ - name: Regenerate dashboard.js
+ run: |
+ autoreconf -ivf
+ ./configure --enable-maintainer-mode
+ make dist
+ - name: Compare generated Dashboard vs. Backed up Dashboard
+ run: |
+ diff -sNrdu /tmp/dashboard.js web/gui/dashboard.js
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 25ece161b4..0000000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-stages:
- - "Code quality, linting, syntax, code style"
-
-job 1:
- stage: "Code quality, linting, syntax, code style"
- before_script:
- - apt-get clean all && apt-get update
- - apt-get install -y shellcheck
- script: shellcheck --format=gcc $(find . -name '*.sh.in' -not -iwholename '*.git*')
-
-job 2:
- stage: "Code quality, linting, syntax, code style"
- script: ./tests/installer/checksums.sh
- variables:
- LOCAL_ONLY: "true"
-
-job 3:
- stage: "Code quality, linting, syntax, code style"
- script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
diff --git a/.travis.yml b/.travis.yml
index fdb1dceb13..82d5f8ad63 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -46,7 +46,6 @@ notifications:
#
stages:
# Mandatory runs, we always want these executed
- - name: Code quality, linting, syntax, code style
- name: Build process
- name: Artifacts validation
- name: Artifacts validation on bare OS, stable to current lifecycle checks
@@ -97,22 +96,6 @@ jobs:
allow_failures:
- env: ALLOW_SOFT_FAILURE_HERE=true
include:
- # Do code quality, syntax checking and other pre-build activities
- - stage: Code quality, linting, syntax, code style
-
- name: Run shellchecking on BASH
- script: shellcheck --format=gcc $(find . -name '*.sh.in' -not -iwholename '*.git*')
-
- # This falls under same stage defined earlier
- - name: Run checksum checks on kickstart files
- script: ./tests/installer/checksums.sh
- env: LOCAL_ONLY="true"
-
- # This falls under same stage defined earlier
- - name: Web Dashboard pre-generated file consistency checks (dashboard.js)
- script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
-
-
# Ensure netdata code builds successfully
- stage: Build process
diff --git a/build/build.sh b/build/build.sh
deleted file mode 100755
index 892a7da988..0000000000
--- a/build/build.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-if [ ! -f .gitignore ]; then
- echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
- exit 1
-fi
-
-if [ "$IS_CONTAINER" != "" ]; then
- autoreconf -ivf
- ./configure --enable-maintainer-mode
- make dist
- rm -rf autom4te.cache
-else
- docker run --rm -it \
- --env IS_CONTAINER=TRUE \
- --volume "${PWD}:/project:Z" \
- --workdir "/project" \
- netdata/builder:gcc \
- ./build/build.sh
-fi