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

ci(runner): Run tests on specific Ubuntu versions #107

Merged
merged 2 commits into from
Jul 28, 2022
Merged
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
20 changes: 20 additions & 0 deletions .github/workflows/test-ubuntu-18.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ubuntu-18.04

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml
with:
runner-os: "ubuntu-18.04"
20 changes: 20 additions & 0 deletions .github/workflows/test-ubuntu-20.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ubuntu-20.04

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml
with:
runner-os: "ubuntu-20.04"
20 changes: 20 additions & 0 deletions .github/workflows/test-ubuntu-22.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: ubuntu-22.04

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml
with:
runner-os: "ubuntu-22.04"
19 changes: 9 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
inputs:
runner-os:
required: true
type: string

defaults:
run:
shell: bash

jobs:
test:
name: clang-format-${{ matrix.version }}
runs-on: ubuntu-latest
name: clang-format-${{ matrix.clang-format-version }}
runs-on: ${{ inputs.runner-os }}
strategy:
fail-fast: false
matrix:
version:
clang-format-version:
- 3
- 4
- 5
Expand All @@ -35,4 +34,4 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Build and test the Docker image
run: test/test.sh ${{ matrix.version }}
run: test/test.sh ${{ matrix.clang-format-version }}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[![Tests](https://github.com/jidicula/clang-format-action/actions/workflows/tests.yml/badge.svg)](https://github.com/jidicula/clang-format-action/actions/workflows/tests.yml) [![shell-lint](https://github.com/jidicula/clang-format-action/workflows/shell-lint/badge.svg?branch=main)](https://github.com/jidicula/clang-format-action/actions?query=workflow%3Ashell-lint+branch%3Amain)
[![ubuntu-18.04](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-18.04.yml/badge.svg)](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-18.04.yml) [![ubuntu-20.04](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-20.04.yml/badge.svg)](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-20.04.yml) [![ubuntu-22.04](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-22.04.yml/badge.svg)](https://github.com/jidicula/clang-format-action/actions/workflows/test-ubuntu-22.04.yml)

[![shell-lint](https://github.com/jidicula/clang-format-action/workflows/shell-lint/badge.svg?branch=main)](https://github.com/jidicula/clang-format-action/actions?query=workflow%3Ashell-lint+branch%3Amain)


# clang-format-action
GitHub Action for `clang-format` checks. Note that this Action does **NOT** format your code for you - it only verifies that your repository's code follows your project's formatting conventions.
Expand Down