Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GitHub Actions使ってみた
Search
Takeo Fujita
January 15, 2020
Programming
1
73
GitHub Actions使ってみた
2020-01-15のShibuya.rbで話した資料です
Takeo Fujita
January 15, 2020
Tweet
Share
More Decks by Takeo Fujita
See All by Takeo Fujita
refinementsを使ってみた話
tkeo
0
280
IRKitで遊んでみた
tkeo
0
2.9k
Other Decks in Programming
See All in Programming
MUSUBIXとは
nahisaho
0
130
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 07
javiergs
PRO
0
550
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
AtCoder Conference 2025
shindannin
0
1.1k
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
CSC307 Lecture 09
javiergs
PRO
1
840
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
並行開発のためのコードレビュー
miyukiw
0
160
Featured
See All Featured
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
A designer walks into a library…
pauljervisheath
210
24k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Darren the Foodie - Storyboard
khoart
PRO
2
2.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Optimizing for Happiness
mojombo
379
71k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
76
Transcript
(JU)VC"DUJPOT ͬͯΈͨ ULFP!HSJNPJSF
ࠓճͷ༰ w SVCZ SBJMTͷϓϩδΣΫτͰ w (JU)VC"DUJPOT্ͰSTQFDͱSVCPDPQΛ࣮ߦ͢ΔΑ͏ʹ ͨ͠ઃఆʹ͍ͭͯ͠·͢
STQFDઃఆ name: rspec on: [push] jobs: rspec: runs-on: ubuntu-latest
services: mysql: image: mysql:5.7 ports: - 3306 env: MYSQL_ROOT_PASSWORD: password options: --health-cmd "mysqladmin ping -h localhost" --health- interval 20s --health-timeout 10s --health-retries 10 steps: ...
STQFDઃఆ name: rspec on: [push] jobs: rspec: runs-on: ubuntu-latest
services: mysql: image: mysql:5.7 ports: - 3306 env: MYSQL_ROOT_PASSWORD: password options: --health-cmd "mysqladmin ping -h localhost" --health- interval 20s --health-timeout 10s --health-retries 10 steps: ... ͩͱμϝͩͬͨ ผͷNZTRME͕ಈ͍͍ͯΔʁ Error response from daemon: driver failed programming external connectivity on endpoint ba63e7e68566491db14827f2d1adb41a_mysql57_a09e79 (9a3741b40cb203da75dd3a74c7a08f04296856b0a7ded0509f809d2af68075d2): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use
STQFDઃఆ steps: - uses: actions/checkout@v1 # チェックアウト - name:
setup ruby # rubyのセットアップ uses: actions/setup-ruby@v1 with: ruby-version: 2.5.x - name: install libraries # 依存ライブラリをインストール run: | sudo apt update || : sudo apt install -y --no-install-recommends libmysqlclient-dev - uses: actions/cache@v1 # キャッシュ読み込み with: path: vendor/bundle key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gem- - name: bundle install # bundle install run: | gem install bundler bundle install --jobs=4 --retry=3 --path=vendor/bundle
STQFDઃఆ steps: - uses: actions/checkout@v1 # チェックアウト - name:
setup ruby # rubyのセットアップ uses: actions/setup-ruby@v1 with: ruby-version: 2.5.x - name: install libraries # 依存ライブラリをインストール run: | sudo apt update || : sudo apt install -y --no-install-recommends libmysqlclient-dev - uses: actions/cache@v1 # キャッシュ読み込み with: path: vendor/bundle key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gem- - name: bundle install # bundle install run: | gem install bundler bundle install --jobs=4 --retry=3 --path=vendor/bundle ͨͼͨͼΤϥʔ͕ى͜ΔͷͰແࢹ͢Δ SVCZKQͰڭ͑ͯΒͬͨ Ωϟογϡ͍ͨ͠ͷͰ ύεΛࢦఆ͢Δ
STQFDઃఆ - name: setup database # DB作成 run: |
cp config/database.yml.ci config/database.yml bundle exec rails db:setup env: MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} MYSQL_ROOT_PASSWORD: password RAILS_ENV: test - name: run rspec # rspec実行 run: bundle exec rspec env: MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} MYSQL_ROOT_PASSWORD: password RAILS_ENV: test - name: slack notification # 失敗時にslackへ通知 uses: 8398a7/
[email protected]
with: author_name: rspec result status: ${{ job.status }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure()
STQFDઃఆ - name: setup database # DB作成 run: |
cp config/database.yml.ci config/database.yml bundle exec rails db:setup env: MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} MYSQL_ROOT_PASSWORD: password RAILS_ENV: test - name: run rspec # rspec実行 run: bundle exec rspec env: MYSQL_PORT: ${{ job.services.mysql.ports['3306'] }} MYSQL_ROOT_PASSWORD: password RAILS_ENV: test - name: slack notification # 失敗時にslackへ通知 uses: 8398a7/
[email protected]
with: author_name: rspec result status: ${{ job.status }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure() ϦϙδτϦͷ 4FUUJOHT4FDSFUT Ͱઃఆ͢Δ ࣗಈͰׂΓͯΒΕͨ ϙʔτΛ༻ ࣗಈͰઃఆ
EBUBCBTFZNMDJ test: adapter: mysql2 encoding: utf8mb4 pool: <%= ENV.fetch("RAILS_MAX_THREADS") {
5 } %> host: 127.0.0.1 port: <%= ENV["MYSQL_PORT"] %> database: app_test username: root password: <%= ENV["MYSQL_ROOT_PASSWORD"] %>
EBUBCBTFZNMDJ test: adapter: mysql2 encoding: utf8mb4 pool: <%= ENV.fetch("RAILS_MAX_THREADS") {
5 } %> host: 127.0.0.1 port: <%= ENV["MYSQL_PORT"] %> database: app_test username: root password: <%= ENV["MYSQL_ROOT_PASSWORD"] %> MPDBMIPTUͩͱμϝͩͬͨ Mysql2::Error::ConnectionError: Access denied for user 'root'@'localhost' (using password: YES)
SVCPDPQ w SFWJFXEPHΛར༻ͯ͠ɺՕॴΛࢦఠ͢Δܗʹͨ͠ w NBSLFUQMBDFͰSVCPDPQ༻ͷBDUJPO͕͍͔ͭ͘ެ։͞Ε ͍ͯΔ͕͕͋Γෆ࠾༻ w όʔδϣϯࢦఆ͕Ͱ͖ͣ࠷৽͕ೖΔ w SVCPDPQQFSGPSNBODFͱ͔ՃͷHFN͕ೖΒͳ͍
w ͳͲ
SVCPDPQઃఆ name: rubocop on: [push] jobs: rubocop: runs-on: ubuntu-latest
steps: - uses: actions/checkout@v1 # チェックアウト - name: setup ruby uses: actions/setup-ruby@v1 # rubyのセットアップ with: ruby-version: 2.5.x - name: install libraries # 依存ライブラリをインストール run: | sudo apt update || : sudo apt install -y --no-install-recommends libmysqlclient-dev
SVCPDPQઃఆ - uses: actions/cache@v1 # キャッシュ読み込み with: path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gem- - name: bundle install # bundle install run: | gem install bundler bundle install --jobs=4 --retry=3 --path=vendor/bundle - name: install reviewdog # reviewdogをインストール run: | curl https://raw.githubusercontent.com/reviewdog/reviewdog/master/ install.sh | sh -s -- $REVIEWDOG_VERSION env: REVIEWDOG_VERSION: v0.9.14
SVCPDPQઃఆ - name: run rubocop # rubocopを実行 run: |
bundle exec rubocop --parallel | ./bin/reviewdog -f=rubocop - reporter=github-check env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: slack notification # 失敗時にslackへ通知 uses: 8398a7/
[email protected]
with: author_name: rubocop result status: ${{ job.status }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} if: failure()
None