パターンマッチのドキュメントを ruby/ruby の rdoc を翻訳する形で追加 #2169
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
ruby-versions: | |
runs-on: ubuntu-latest | |
outputs: | |
versions: ${{ steps.versions.outputs.value }} | |
steps: | |
- id: versions | |
run: | | |
versions=$(curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/cruby.json' | jq -c '. + []') | |
echo "::set-output name=value::${versions}" | |
rake: | |
needs: ruby-versions | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} | |
exclude: | |
- os: windows-latest | |
ruby: '3.2' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Install dependencies | |
run: bundle install | |
- name: Run rake | |
run: bundle exec rake | |
- name: Create tarballs | |
if: ${{ runner.os != 'Windows' }} | |
run: | | |
set -ex | |
mkdir /tmp/artifact | |
cd /tmp/html | |
for d in *.*; do | |
tar acf ../artifact/$d.tar.xz $d | |
done | |
- name: Create tarballs | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
mkdir /tmp/artifact | |
cd /tmp/html | |
ls -Name "*.*" | foreach { | |
tar acf "../artifact/${_}.tar.xz" $_ | |
} | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: statichtml-${{ matrix.os }}-${{ matrix.ruby }} | |
path: /tmp/artifact/*.*.tar.xz | |
- name: Rename generated html | |
run: | | |
cd /tmp | |
mv -v html html.pr | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.base.sha }} | |
- name: Install dependencies | |
run: bundle install | |
- name: Run rake | |
run: bundle exec rake | |
- name: Rename generated html and generate diff | |
run: | | |
cd /tmp | |
mv -v html html.base | |
git diff --no-index html.base html.pr --stat || true | |
git diff --no-index html.base html.pr --output artifact/html.diff || true | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: diff-${{ matrix.os }}-${{ matrix.ruby }} | |
path: /tmp/artifact/html.diff | |
misspell: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install misspell | |
run: 'curl -L https://git.io/misspell | bash' | |
- name: Run misspell | |
run: | | |
git ls-files -z | xargs -0 ./bin/misspell -error -i addopt |