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
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
「Recommended flow for CI | Infer」こちらで CI 向けのおすすめ実行方法が書いてあります。うまくキャッシュできるのであれば --reactive オプションでキャプチャーした情報を再利用すれば早くなると思います。 reportdiff は reviewdog で同等のことができるのでどちらでも。
一部プラグインがインストールできないなくて、調べたことがきっかけで新方式を知りました。 実際にはツールの問題じゃなく、lts イメージを使ってたのが直接の原因でしたが。 Some plugins failed to download! Not downloaded とエラーになる場合は、lts-jdk11 のイメージを使いましょう。
GET と Get や get など大文字小文字の揺れを除外したい場合、これで実現可能だったのですが、未定義語にはカタカナ語なども入ることがあるため、このユースケースに対応するために --exclude-alphabet (--no-alpha) と --exclude-ascii (--no-ascii) オプションを追加しました。
CI でパラメタライズドなテストを実行するときに、マトリックスを組むことがあると思います。 GitHub Actions でも strategy.matrix でマトリックスを組めます。
例えば、上記公式ドキュメントのサンプルの
strategy:
matrix:
node: [10, 12, 14]
steps:
# Configures the node version used on GitHub-hosted runners
- uses: actions/setup-node@v2
with:
# The Node.js version to configure
node-version: ${{ matrix.node }}
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
Body type を「Raw」にし、Content type は「JSON (application/json)」にします。 Request content には「{ "ref": "master" }」(今は main の場合もあるでしょう)を入力します。workflow_dispatch には任意の input パラメータを設定できますが、それらの設定はここにつけ足すことになります。
設定できたらモジュールを右クリックし、「Run this module only」を実行して、トリガーできるか確認しましょう。 Integromat での設定例を紹介しましたが、他の場合でも対応方法は同じような流れになると思います。
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
今回は Pipelines だけまずは使いたいので Step 2/3 はスキップして「Step 4: Define a pipeline」から始めます。
Artifactory を Integrations に追加
※成果物を特に扱わない、パイプラインを試してみるだけ、という場合は飛ばして OK
先に、Artifactory 用の API Token を JFrog の User Profile から払い出しておきます。 右上のユーザーメニューから「Edit Profile」を開き、ログインパスワードを入力して Unlock します。 Unlock すると操作できるようになるので「Authentication Settings」の「Generate API Key」をクリックします。
API キーが生成されたら、コピーしておきましょう。
つづいて、「Administraion」タブの「Pipelines」から「Integrations」を開き、右上の「+ Add an Integration」をクリックします。 Pipeline から利用するので「Usage」は Pipelines を選択。
名前は任意、「Integration Type」に Artifactory を選択します。 URL と User はデフォルトのままで良いと思います。 API Key に先程コピーしたものをペーストし、「Create」をクリックして完了です。
「Assign Pipelines to this Integration」はとりあえず Any で OK です。制限かけたい場合はチェックを外すと許可する source を選択できます。(画像にはいくつか source がありますが、現時点ではまだ source 登録してないので空っぽだと思います)
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