web/.github/workflows/ci.yml

72 lines
1.5 KiB
YAML
Raw Normal View History

2020-05-30 00:32:36 +03:00
name: 'Continuous Integration'
2020-01-21 22:05:06 +03:00
on:
push:
2020-03-01 20:03:58 +03:00
branches-ignore:
- stable
tags-ignore:
- '*'
2020-01-21 22:05:06 +03:00
paths-ignore:
2020-03-01 20:03:58 +03:00
- '.github/**'
2020-06-05 22:19:24 +03:00
- '!.github/workflows/ci.yml'
2020-03-01 20:03:58 +03:00
- '.travis.yml'
- '.gitignore'
- 'docs/**'
- 'README.md'
- 'LICENSE'
2020-01-21 22:05:06 +03:00
pull_request:
paths:
2020-03-01 20:03:58 +03:00
- "**"
2020-01-21 22:05:06 +03:00
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/setup-ruby@v1
with:
2020-01-25 19:45:06 +03:00
ruby-version: '2.6.x'
2020-01-21 22:05:06 +03:00
- name: Checkout
uses: actions/checkout@v2
2020-04-09 22:15:51 +03:00
with:
fetch-depth: 0
2020-01-21 22:05:06 +03:00
- name: Bundle Caching
id: bundle-cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
2020-04-09 22:15:51 +03:00
- name: Install GNU-Coreutils(for macOS)
2020-01-21 22:05:06 +03:00
if: runner.os == 'macOS'
run: |
brew install coreutils
- name: Bundle config
run: |
bundle config path vendor/bundle
- name: Bundle Install
if: steps.bundle-cache.outputs.cache-hit != 'true'
run: |
bundle install
- name: Bundle Install locally
if: steps.bundle-cache.outputs.cache-hit == 'true'
run: |
bundle install --local
- name: Build Site
run: |
bash tools/build.sh
- name: Test Site
run: |
bash tools/test.sh