Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GitHub Actions使ってみた
Search
Takeo Fujita
January 15, 2020
Programming
1
71
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
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
11
11k
Microservices Platforms: When Team Topologies Meets Microservices Patterns
cer
PRO
1
1k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
ゲームの物理 剛体編
fadis
0
320
スタートアップを支える技術戦略と組織づくり
pospome
8
16k
20 years of Symfony, what's next?
fabpot
2
340
無秩序からの脱却 / Emergence from chaos
nrslib
2
13k
Developing static sites with Ruby
okuramasafumi
0
250
AIコーディングエージェント(NotebookLM)
kondai24
0
170
愛される翻訳の秘訣
kishikawakatsumi
1
310
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
360
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
160
Featured
See All Featured
Docker and Python
trallard
47
3.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
The Language of Interfaces
destraynor
162
25k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
121
20k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
4 Signs Your Business is Dying
shpigford
186
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
For a Future-Friendly Web
brad_frost
180
10k
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