This commit is contained in:
Parker Moore 2019-10-10 12:51:55 -04:00
Родитель 2747fa68f5
Коммит 95ca80da3e
4 изменённых файлов: 38 добавлений и 4 удалений

19
.github/workflows/push.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,19 @@
on: push
name: cibuild on push
jobs:
build:
name: "GitHub Pages Tests"
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- 2.3
- 2.4
- 2.5
- 2.6
steps:
- uses: actions/checkout@master
- name: script/cibuild-docker
run: script/cibuild-docker
with:
ruby_version: ${{ matrix.ruby }}

Просмотреть файл

@ -1,4 +1,5 @@
FROM ruby:2.5.3
ARG RUBY_VERSION
FROM ruby:$RUBY_VERSION
RUN apt-get update \
&& apt-get install -y \
@ -7,11 +8,15 @@ RUN apt-get update \
make \
nodejs
COPY . /src/gh/pages-gem
COPY Gemfile* /src/gh/pages-gem/
COPY github-pages.gemspec /src/gh/pages-gem
COPY lib/ /src/gh/pages-gem/lib
RUN \
bundle config local.github-pages /src/gh/pages-gem && \
bundle install --gemfile=/src/gh/pages-gem/Gemfile
NOKOGIRI_USE_SYSTEM_LIBRARIES=true bundle install --gemfile=/src/gh/pages-gem/Gemfile
COPY . /src/gh/pages-gem
RUN \
echo "en_US UTF-8" > /etc/locale.gen && \

Просмотреть файл

@ -6,7 +6,7 @@ set -e
echo "Jekyll version: $(bundle exec jekyll --version)"
echo "Running Ruby tests..."
bundle exec rspec
bundle exec rspec --format documentation
echo "Running Ruby style tests..."
script/fmt --display-style-guide

10
script/cibuild-docker Executable file
Просмотреть файл

@ -0,0 +1,10 @@
#!/bin/sh
set -ex
# Set the ruby version in the Action definition matrix.
RUBY_VERSION="$INPUT_RUBY_VERSION"
: "${RUBY_VERSION:="2.5.3"}"
docker build --build-arg "RUBY_VERSION=$RUBY_VERSION" -t github-pages .
docker run --rm --workdir /src/gh/pages-gem github-pages script/cibuild