diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..23b1f5b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: + push: + branches: [master, develop] + pull_request: + branches: [master] + +jobs: + Shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + + env: + SHELLCHECK_VERSION: 0.7.1 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Shellcheck + run: | + wget https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + tar xf shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + mv shellcheck-v${SHELLCHECK_VERSION} shellcheck-latest + + - name: Print Shellcheck version info + run: ./shellcheck-latest/shellcheck --version + + - name: Check scripts + run: | + bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck SOURCES/web-utils' + + Perfecto: + name: Perfecto + runs-on: ubuntu-latest + + steps: + - name: Code checkout + uses: actions/checkout@v2 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Run Perfecto docker image + uses: docker://essentialkaos/perfecto:slim + with: + args: --version + + - name: Install perfecto-docker + run: | + wget https://kaos.sh/perfecto/perfecto-docker + chmod +x perfecto-docker + + - name: Run Perfecto check + env: + IMAGE: essentialkaos/perfecto:slim + run: ./perfecto-docker web-utils.spec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7a09292..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: shell - -services: - - docker - -jobs: - fast_finish: true - -env: - global: - - IMAGE=essentialkaos/perfecto:centos7 SHELLCHECK_VERSION=0.7.1 - -before_install: - - wget https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz - - tar xf shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz - - mv shellcheck-v${SHELLCHECK_VERSION} shellcheck-latest - - ./shellcheck-latest/shellcheck --version - - docker pull "$IMAGE" - - wget https://kaos.sh/perfecto/perfecto-docker - - chmod +x perfecto-docker - -script: - - bash -c 'shopt -s globstar; ./shellcheck-latest/shellcheck SOURCES/web-utils' - - ./perfecto-docker web-utils.spec diff --git a/README.md b/README.md index 5bf4b63..b55795a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

- + GitHub Actions Status

@@ -85,8 +85,8 @@ Examples | Branch | Status | |--------|--------| -| `master` | [![Build Status](https://travis-ci.org/essentialkaos/web-utils.svg?branch=master)](https://travis-ci.org/essentialkaos/web-utils) | -| `develop` | [![Build Status](https://travis-ci.org/essentialkaos/web-utils.svg?branch=develop)](https://travis-ci.org/essentialkaos/web-utils) | +| `master` | [![CI](https://github.com/essentialkaos/web-utils/workflows/CI/badge.svg?branch=master)](https://github.com/essentialkaos/web-utils/actions) | +| `develop` | [![CI](https://github.com/essentialkaos/web-utils/workflows/CI/badge.svg?branch=develop)](https://github.com/essentialkaos/web-utils/actions) | ### License