diff --git a/.github/workflows/eslint-styleline.yml b/.github/workflows/eslint-styleline.yml new file mode 100644 index 000000000..d443db58e --- /dev/null +++ b/.github/workflows/eslint-styleline.yml @@ -0,0 +1,38 @@ +name: eslint-stylelint + +on: [pull_request] + +jobs: + eslint-stylelint: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + tests: ["eslint", "stylelint"] + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install Dependencies + run: npm install + + - name: Run test + run: make ${{ matrix.tests }} diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 000000000..297126d6e --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,20 @@ +name: flake8 + +on: [pull_request] + +jobs: + flake8: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Lint with flake8 + run: | + pip install flake8 + make flake8 diff --git a/.github/workflows/rpm-build.yml b/.github/workflows/rpm-build.yml new file mode 100644 index 000000000..4cf6ba074 --- /dev/null +++ b/.github/workflows/rpm-build.yml @@ -0,0 +1,18 @@ +name: rpm-build + +on: [pull_request] + +jobs: + rpm-build: + runs-on: ubuntu-20.04 + container: + image: quay.io/fedora/fedora:33-x86_64 + + steps: + - name: Install Dependencies + run: dnf install -y make cmake rpm-build which gnupg git tar xz rsync curl jq nodejs python gcc gcc-c++ libappstream-glib + + - uses: actions/checkout@v2 + + - name: Run rpm-build test + run: make rpm srpm diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6558014e8..000000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# yamllint disable rule:line-length -sudo: required -dist: xenial -services: - - docker -language: python -python: - - "3.7" -cache: - directories: - - node_modules -before_install: - - | - git config --global user.email "travis@welder.web" - git config --global user.name "Travis CI" - git remote add welder https://github.com/${TRAVIS_REPO_SLUG}.git - git fetch welder $TRAVIS_BRANCH - git log -1 --pretty=format:%H welder/${TRAVIS_BRANCH} - git rebase welder/${TRAVIS_BRANCH} - - | - if [ "$COMMAND" == "eslint" ] || [ "$COMMAND" == "stylelint" ]; then - nvm install 'lts/*' - nvm use 'lts/*' - fi -install: - - | - if [ "$COMMAND" == "eslint" ] || [ "$COMMAND" == "stylelint" ]; then - npm install - fi - - | - if [ "$COMMAND" == "flake8" ]; then - python -V - pip -V - pip install flake8 - fi -env: - matrix: - - COMMAND=eslint - - COMMAND=stylelint - - COMMAND=test_rpmbuild - - COMMAND=flake8 -script: - - make "$COMMAND" -notifications: - email: - on_failure: change - on_success: never diff --git a/README.md b/README.md index 2a51e78f9..2ee5b25f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Cockpit Composer -[![Build Status](https://travis-ci.org/osbuild/cockpit-composer.svg?branch=master)](https://travis-ci.org/osbuild/cockpit-composer) [![codecov](https://codecov.io/gh/osbuild/cockpit-composer/branch/master/graph/badge.svg)](https://codecov.io/gh/osbuild/cockpit-composer) **The web interface for Composer!** @@ -140,10 +139,9 @@ After every change to your sources, run `make` to update all the webpacks, and r │ └── /index.ejs # Template for index.html ├── /test/ # Integration test ├── /utils/ # Utility and helper classes -│── .travis.yml # Travis CI settings │── babel.config.js # babel configurations │── cockpit-composer.spec.in # Cockpit-composer spec file -│── Dockerfile.buildrpm # Dockerfile for building RPM on Travis +│── Dockerfile.buildrpm # Dockerfile for building RPM on Github Actions │── io.weldr.cockpit-composer.metainfo.xml # Makes Composer appear on Cockpit's "Applications" page │── main.js # React application entry point │── Makefile # Makefile