From 70eab79c16cd1a42f302f139628943c707481e77 Mon Sep 17 00:00:00 2001 From: felipeog <17603069+felipeog@users.noreply.github.com> Date: Sun, 8 Sep 2024 20:07:27 -0300 Subject: [PATCH 1/3] add pull workflow --- .github/workflows/pull.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pull.yaml diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml new file mode 100644 index 0000000..1e88aa1 --- /dev/null +++ b/.github/workflows/pull.yaml @@ -0,0 +1,16 @@ +name: PR to main + +on: + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.23.1" + - run: go test ./... From a05b081dd7f7d641ecce19d74916048b347b825e Mon Sep 17 00:00:00 2001 From: felipeog <17603069+felipeog@users.noreply.github.com> Date: Sun, 8 Sep 2024 21:15:30 -0300 Subject: [PATCH 2/3] update pull workflow --- .github/workflows/pull.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull.yaml b/.github/workflows/pull.yaml index 1e88aa1..8bdd50f 100644 --- a/.github/workflows/pull.yaml +++ b/.github/workflows/pull.yaml @@ -9,8 +9,13 @@ jobs: test: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 with: go-version: "1.23.1" - - run: go test ./... + - name: Run tests + run: | + cd practice/exercism + go test ./... From a627001d50826fd9d9b651422e4926a898edb1ff Mon Sep 17 00:00:00 2001 From: felipeog <17603069+felipeog@users.noreply.github.com> Date: Sun, 8 Sep 2024 21:22:45 -0300 Subject: [PATCH 3/3] add push workflow --- .github/workflows/push.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/push.yaml diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..fd08ec9 --- /dev/null +++ b/.github/workflows/push.yaml @@ -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