simple-icons/.github/workflows/verify.yml
Eric Cornelissen c21487f4d1
Switch from Travis CI to GitHub Actions (#4126)
* Add GitHub Actions workflow for verification

Add a GitHub Actions workflow file that does the verification of pushes
and pull requests. I.e., it runs the linters, runs the tests, and builds
the website. This workflow runs for all `pull_requests` and `push`es.

* Add GitHub Actions workflow for deployment

Add a GitHub Actions workflow file that does the deployment upon pushes
to master. Before actually deploying, the linters and test are ran, just
in case.

* Remove Travis CI configuration file

* Remove unnecessary quotes from existing workflows

* Add caching for "Build website" verification

* Update build badge in README

Co-authored-by: Álvaro Mondéjar <mondejar1994@gmail.com>
2020-11-28 11:34:36 +01:00

61 lines
1.4 KiB
YAML

name: Verify
on: [pull_request, push]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm ci
- name: Run linter
run: |
npm run jsonlint
npm run svglint
npm run wslint
npm run our-lint
build:
name: Build website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Ruby 2.5
uses: actions/setup-ruby@v1
with:
ruby-version: 2.5
- name: Setup cache for gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Install Jekyll
run: |
echo -e 'source "https://rubygems.org"\n\ngem "jekyll"' > Gemfile
bundle config set path 'vendor/bundle'
bundle install --jobs 4 --retry 3
- name: Build website
run: bundle exec jekyll build
test:
name: Test package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test