Skip to content

Commit

Permalink
ci: audit test workflow (#24)
Browse files Browse the repository at this point in the history
* ci: rename workflows, jobs, and steps

* ci: checkout action to `ctest-action` directory

* ci: checkout action sparsely
  • Loading branch information
threeal authored Mar 20, 2024
1 parent 6463d02 commit 8452526
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/test.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
name: test
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
default-usage:
test-action:
name: Test Action
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [windows, ubuntu, macos]
steps:
- name: Checkout the repository
- name: Checkout
uses: actions/checkout@v4.1.2
with:
path: ctest-action
sparse-checkout: |
test
action.yaml
sparse-checkout-cone-mode: false

- name: Move the test project to the working directory
run: mv test/* .
- name: Prepare Sample Project
run: mv ctest-action/test/* .

- name: Configure and build the project
- name: Configure and Build Project
uses: threeal/cmake-action@v1.3.0
with:
run-build: true

- name: Use the action
uses: ./
- name: Test Project
uses: ./ctest-action
with:
args: ${{ matrix.os == 'windows' && '-C Debug' || '' }}

0 comments on commit 8452526

Please # to comment.