Skip to content

Commit

Permalink
Merge pull request #1 from felipeog/workflows
Browse files Browse the repository at this point in the history
feat: workflows
  • Loading branch information
felipeog authored Sep 9, 2024
2 parents e3c0408 + a627001 commit bbfe150
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pull.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR to main

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23.1"
- name: Run tests
run: |
cd practice/exercism
go test ./...
28 changes: 28 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Push to main

on:
push:
branches:
- main

jobs:
format:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.23.1"
- name: Format
run: |
cd practice/exercism
go fmt ./...
- name: Commit changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "format" || exit 0
git push

0 comments on commit bbfe150

Please sign in to comment.