Test again #24
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
name: Test CI | |
concurrency: | |
group: ${{ github.workflow }}#${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
draft_pr_reminder: | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Add comment to PR | |
if: ${{ github.event_name == 'pull_request' | |
&& github.event.action == 'opened' | |
&& github.event.pull_request.draft }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
message: | | |
Friendly reminder, CI workflows in draft PR's only run on ubuntu-20.04. | |
reactions: eyes | |
comment_tag: friendly_reminder | |
- name: Remove comment from PR | |
if: ${{ !github.event.pull_request.draft }} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
comment_tag: friendly_reminder | |
mode: delete | |
ci: | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} - ${{ matrix.config.foo }} | |
strategy: | |
matrix: | |
os: [ macOS-11, ubuntu-20.04] | |
config: | |
- {"foo": "bar"} | |
- {"foo": "baz"} | |
include: | |
- os: ubuntu-22.04 | |
config: | |
foo: "fish" | |
steps: | |
- name: filter step | |
id: run_on_this_platform | |
if: ${{ !github.event.pull_request.draft || matrix.os == 'ubuntu-20.04' }} | |
run: | | |
echo "${{ matrix.os }}" | |
echo "${{ matrix.config.foo }}" | |
- name: actual work | |
if: steps.run_on_this_platform.outcome == 'success' | |
run: | | |
echo "doing real work here." | |
sleep 60 | |
echo "done" |