Skip to content

Commit

Permalink
bundler-cache (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Dec 18, 2022
1 parent 9e82c86 commit 3ace303
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
8 changes: 7 additions & 1 deletion .ci/awesome_bot.sh
@@ -1,9 +1,15 @@
#!/bin/bash

if type awesome_bot >/dev/null 2>&1; then
AWESOME_BOT_EXEC="awesome_bot"
else
AWESOME_BOT_EXEC="bundle exec awesome_bot"
fi

awesome_bot_with_retry() {
local attempt_max=5
local -i attempt_num=1
until awesome_bot "$@"; do
until ${AWESOME_BOT_EXEC} "$@"; do
if ((attempt_num == attempt_max)); then
exit 1
fi
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/awesome-bot.yml
Expand Up @@ -10,16 +10,23 @@ on:
name: AsesomeBot
jobs:
check:
runs-on: ubuntu-latest
# act の場合 github.ref_protected がないのでそれを利用
# act の image に libssl1.1 が入ってないので 20.04 を使う
runs-on: ${{ (github.ref_protected == null && 'ubuntu-20.04') || 'ubuntu-latest' }}
env:
ASESOME_BOT_OPTION: --allow-redirect --allow-ssl --allow-dupe -t 60
steps:
- uses: actions/checkout@v3
- name: Create Gemfile
run: |
{
echo 'source "http://rubygems.org"'
echo "gem 'awesome_bot'"
} > Gemfile
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: install
run: gem install awesome_bot
ruby-version: 3.1
bundler-cache: true
- name: check
run: |
# shellcheck disable=SC2086
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -25,6 +25,10 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
# jobs.*.if では env 参照できない
# act の場合 github.ref_protected がないのでそれを利用
# act では実行しない
if: github.ref_protected != null

strategy:
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: test
run: |
make -C test test
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: test-result
path: test/*.xml
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: test
run: |
make -C test test
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: test-result
path: test/*.xml
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gtest-compat.yml
Expand Up @@ -16,6 +16,8 @@ on:
- '*.yaml'
- '.circleci/**'
- '.semaphore/**'
- '.github/**'
- '!.github/workflows/gtest-compat.yml'
push:
branches:
- master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
echo "${GITHUB_EVENT_CONTEXT}" > github_event.json
- name: store event
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: github_event.json
path: github_event.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/metrics.yml
Expand Up @@ -72,7 +72,7 @@ jobs:
with:
args: -o lizard.html --html ./include
- name: Archive code metrics results
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: lizard.html
path: lizard.html
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reviewdog.yml
Expand Up @@ -54,6 +54,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
with:
reporter: github-pr-review

hadolint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 3ace303

Please sign in to comment.