Skip to content

Commit

Permalink
ci: add separate run action
Browse files Browse the repository at this point in the history
  • Loading branch information
dhth committed Aug 24, 2024
1 parent 7befdf8 commit 26e1cda
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ env:

jobs:
build:
name: build
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand All @@ -32,10 +28,3 @@ jobs:
run: go build -v ./...
- name: go test
run: go test -v ./...
- name: run omm
run: |
go build .
cat assets/sample-tasks.txt | ./omm import
./omm 'test: a task'
./omm tasks
./.github/scripts/checknumtasks.sh "$(./omm tasks | wc -l | xargs)" 11
37 changes: 37 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: run

on:
push:
branches: [ "main" ]
pull_request:
paths:
- "go.*"
- "**/*.go"
- ".github/workflows/*.yml"

permissions:
contents: read

env:
GO_VERSION: '1.22.5'

jobs:
run:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: build
run: go build .
- name: run
run: |
cat assets/sample-tasks.txt | ./omm import
./omm 'test: a task'
./omm tasks
./.github/scripts/checknumtasks.sh "$(./omm tasks | wc -l | xargs)" 11

0 comments on commit 26e1cda

Please sign in to comment.