-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the enhancement
I'm finding that it is quite annoying to have to define an if condition for every single item in the steps section of a test matrix. It would be great if you could define a block per se
Code Snippet
For instance, let's say I have a setup like so
# Linux
- name: Wait / Sleep
uses: jakejarvis/wait-action@v0.1.0
if: ${{ runner.os == 'Linux' }}
with:
time: '1m'
- name: Collect Docker Logs
uses: jwalton/gh-docker-logs@v1.0.0
if: ${{ runner.os == 'Linux' }}
- name: Check running containers
run: docker ps -a
if: ${{ runner.os == 'Linux' }}
- name: Set PGHOST on Linux
run: echo "PGHOST=localhost" >> $GITHUB_ENV
if: ${{ runner.os == 'Linux' }}
# MacOS
- name: Set PGUSER on macOS
run: |
echo "PGUSER=$USER" >> $GITHUB_ENV
echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: Start Homebrew PostgreSQL service
run: pg_ctl -D /usr/local/var/postgres start
if: ${{ runner.os == 'macOS' }}
# Windows
- name: Add PostgreSQL to Path
run: |
echo $env:PGBIN
echo $env:PGBIN | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: ${{ runner.os == 'Windows' }}
- name: Start Windows PostgreSQL service
run: |
pg_ctl -D $env:PGDATA start
pg_ctl -D $env:PGDATA status
if: ${{ runner.os == 'Windows' }}It would be awesome if it could be formatted like so:
# Linux
- if: ${{ runner.os == 'Linux' }}
- name: Wait / Sleep
uses: jakejarvis/wait-action@v0.1.0
with:
time: '1m'
- name: Collect Docker Logs
uses: jwalton/gh-docker-logs@v1.0.0
- name: Check running containers
run: docker ps -a
- name: Set PGHOST on Linux
run: echo "PGHOST=localhost" >> $GITHUB_ENV
# MacOS
- if: ${{ runner.os == 'macOS' }}
- name: Set PGUSER on macOS
run: |
echo "PGUSER=$USER" >> $GITHUB_ENV
echo "LIBPQJL_DATABASE_USER=$USER" >> $GITHUB_ENV
- name: Start Homebrew PostgreSQL service
run: pg_ctl -D /usr/local/var/postgres start
# Windows
- if: ${{ runner.os == 'Windows' }}
- name: Add PostgreSQL to Path
run: |
echo $env:PGBIN
echo $env:PGBIN | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Start Windows PostgreSQL service
run: |
pg_ctl -D $env:PGDATA start
pg_ctl -D $env:PGDATA statustetchel and likern
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request