зеркало из https://github.com/github/pages-gem.git
Run CI in GitHub Actions
This commit is contained in:
Родитель
2747fa68f5
Коммит
95ca80da3e
|
@ -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 }}
|
11
Dockerfile
11
Dockerfile
|
@ -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
|
||||
|
|
|
@ -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
|
Загрузка…
Ссылка в новой задаче