Skip to content

Commit

Permalink
wip: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Aug 31, 2024
1 parent 69c580b commit e007fca
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Test
on:
push:

permissions:
contents: read
id-token: write
workflow_call:
inputs:
forge_version:
description: |
The version of the forge CLI to install (use 'local' for testing)
required: true
type: string

jobs:
discover:
Expand All @@ -16,7 +17,7 @@ jobs:
- name: Setup
uses: ./forge/actions/setup
with:
forge_version: local
forge_version: ${{ inputs.forge_version }}
- name: Discovery
id: discovery
uses: ./forge/actions/discovery
Expand All @@ -31,15 +32,18 @@ jobs:
needs: [discover]
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^check.*']) }}
forge_version: ${{ inputs.forge_version }}

build:
uses: ./.github/workflows/run.yml
needs: [discover, check]
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^build.*']) }}
forge_version: ${{ inputs.forge_version }}

test:
uses: ./.github/workflows/run.yml
needs: [discover, check, build]
with:
earthfiles: ${{ toJson(fromJson(needs.discover.outputs.result)['^test.*']) }}
forge_version: ${{ inputs.forge_version }}
15 changes: 15 additions & 0 deletions .github/workflows/dogfood.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Dogfood

on:
push:

permissions:
id-token: write
contents: write
packages: write

jobs:
ci:
uses: ./.github/workflows/ci.yml
with:
forge_version: local
7 changes: 6 additions & 1 deletion .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
A JSON list of Earthfile paths+targets to run
required: true
type: string
forge_version:
description: |
The version of the forge CLI to install (use 'local' for testing)
required: true
type: string

jobs:
run:
Expand All @@ -20,7 +25,7 @@ jobs:
- name: Setup CI
uses: ./forge/actions/setup
with:
forge_version: local
forge_version: ${{ inputs.forge_version }}
- name: Run
uses: ./forge/actions/run
with:
Expand Down

0 comments on commit e007fca

Please sign in to comment.