Skip to content

Commit

Permalink
Inject step before test
Browse files Browse the repository at this point in the history
  • Loading branch information
miensol committed Nov 10, 2023
1 parent 0421f62 commit 1051aea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
19 changes: 19 additions & 0 deletions .github/actions/compile-test-lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: compile-test-lint
description: "Will it work"
inputs:
before-test-action:
description: 'Actions to run before test'
runs:
using: "composite"
steps:
- name: "Compile"
run: echo 'Compile'
shell: bash
- uses: ${{ input.before-test-action }}
name: "Before test"
- run: echo 'Test'
name: "Test"
shell: bash
- run: echo 'Lint'
name: "Lint"
shell: bash
22 changes: 4 additions & 18 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,12 @@ on:
- main
name: Build, Test, Deploy
jobs:
compile:
compmile-test-lint:
runs-on: ubuntu-latest
steps:
- run: echo 'Compile'
name: "Compile"
test:
runs-on: ubuntu-latest
needs:
- compile
steps:
- run: echo 'Test'
name: "Test"
lint:
runs-on: ubuntu-latest
needs:
- compile
steps:
- run: echo 'Lint'
name: "Lint"

- uses: bright/github-workflows-examples/.github/actions/compile-test-lint
with:
before-test-action: actions/setup-node@v3
deploy-staging:
runs-on: ubuntu-latest
environment: staging
Expand Down

0 comments on commit 1051aea

Please sign in to comment.