0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Github ActionsでdevelopブランチにPullRequestが作成されたタイミングでテストを実行してみる。

Last updated at Posted at 2021-01-30

GithubのActionsタブから新しいActionを追加する

# .github/workflows/実行するアクションの名前.ymlでファイルを作る
$ touch .github/workflows/run-tests-on-pr-towards-develop.yml
.github/workflows/run-tests-on-pr-towards-develop.yml

name: Run Tests on PR towards develop branch

# Controls when the action will run.
on:
  # Triggers the workflow on pull request events but only for the develop branch
  pull_request:
    branches: [ develop ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2

      - name: Install npm packages
        run: npm install
      - name: Run Tests
        run: npm run test
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?