Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add matrix to Test workflow #403

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test

on:
pull_request:
branches:
Expand All @@ -8,21 +9,38 @@ on:
- main
permissions:
contents: write # for pre-commit-action

jobs:
test:
name: Test
runs-on: ubuntu-22.04
pre-commit:
name: Pre-commit Checks
runs-on: ubuntu-latest
steps:
- name: Check out repository.
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Run pre-commit hooks.
uses: ScribeMD/pre-commit-action@bc61f671d0d1d526256c65f486e1f0a49da5f572 # 0.9.129

test-action:
name: Test Action
strategy:
matrix:
runner: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04] # https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: ${{ matrix.runner }}
steps:
- name: Check out repository.
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Use Docker in rootless mode.
uses: ./
- name: Run pre-commit hooks.
uses: ScribeMD/pre-commit-action@832e026101148e0234fde20eecf91c08942ace4a # 0.9.127

notify:
name: Slack Notification
needs: [pre-commit, test-action]
runs-on: ubuntu-latest
if: always()
steps:
- name: Send Slack notification with job status.
if: always()
uses: ScribeMD/slack-templates@bea126c3915616204196f29d27d6ab9526d61a25 # 0.6.37
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
- id: poetry-install
- id: pre-commit-install
- id: megalinter-incremental
args: &megalinter-args [--flavor, documentation, --release, v7.7.0]
args: &megalinter-args [--flavor, documentation, --release, v7.12.0]
- id: megalinter-full
args: *megalinter-args

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ docker info --format "{{ .ClientInfo.Context }}"

## Supported Runners

- Tested on `ubuntu-22.04`
- Probably works on `ubuntu-18.04` and `ubuntu-20.04`
- Tested on `ubuntu-24.04` and `ubuntu-22.04`
- May work on future versions of Linux
- Definitely doesn't work on Windows or macOS since Docker only offers rootless
mode on Linux
Expand Down
29 changes: 14 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.