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
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
270
IRKitで遊んでみた
tkeo
0
2.8k
Other Decks in Programming
See All in Programming
Module Proxyのマニアックな話 / Niche Topics in Module Proxy
kuro_kurorrr
0
200
CSC305 Lecture 12
javiergs
PRO
0
240
Register is more than clipboard
satorunooshie
1
180
Dive into Triton Internals
appleparan
0
350
contribution to astral-sh/uv
shunsock
0
570
AI Agent 時代的開發者生存指南
eddie
4
2.2k
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
430
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.4k
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
250
Pythonに漸進的に型をつける
nealle
1
140
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
3
1.7k
Ktorで簡単AIアプリケーション
tsukakei
0
120
Featured
See All Featured
Thoughts on Productivity
jonyablonski
71
4.9k
It's Worth the Effort
3n
187
28k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to Ace a Technical Interview
jacobian
280
24k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Bash Introduction
62gerente
615
210k
Writing Fast Ruby
sferik
630
62k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Balancing Empowerment & Direction
lara
5
710
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
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