From e86e787f32857845e0eba3ad53fe79181ea307d5 Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Sat, 27 Jul 2024 23:57:59 +0700 Subject: [PATCH 1/4] updated `GitHub Action` --- .github/workflows/go.yml | 21 --------------------- .github/workflows/linter.yml | 19 +++++++++++++++++++ .github/workflows/tests.yml | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 928c6088..00000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This file adheres to the YAML5 style. -{ - name: "Go", - on: ["push", "pull_request"], - jobs: { - build: { - name: "Build", - "runs-on": "ubuntu-latest", - steps: [ - { - name: "Set up Go 1.16", - uses: "actions/setup-go@v1", - "with": {"go-version": 1.16}, - id: "go", - }, - {name: "Check out code into the Go module directory", uses: "actions/checkout@v1"}, - {name: "Tests and lints", run: "make check"}, - ], - }, - }, -} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..8c31ca68 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,19 @@ +name: Linter + +on: + push: + branches: [ master ] + pull_request: + +jobs: + steps: + - name: Fetch Sources + uses: actions/checkout@v4 + + - name: Set up Go 1.16 + uses: actions/setup-go@v5 + with: + go-version: 1.16 + + - name: Run Linter + run: make lint diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..7d23aee6 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,19 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + +jobs: + steps: + - name: Fetch Sources + uses: actions/checkout@v4 + + - name: Set up Go 1.16 + uses: actions/setup-go@v5 + with: + go-version: 1.16 + + - name: Run Tests + run: make test From 45fc86d2c2d70e4b373eafd3078a072e660fc96f Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Sun, 28 Jul 2024 00:01:37 +0700 Subject: [PATCH 2/4] updated `GitHub Action` --- .github/workflows/linter.yml | 2 ++ .github/workflows/tests.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 8c31ca68..fe1138e8 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -6,6 +6,8 @@ on: pull_request: jobs: + linter: + runs-on: ubuntu-latest steps: - name: Fetch Sources uses: actions/checkout@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7d23aee6..5b2a1e4c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,8 @@ on: pull_request: jobs: + tests: + runs-on: ubuntu-latest steps: - name: Fetch Sources uses: actions/checkout@v4 From ab1fad205da4eab5bdeb42e66613943d3d87baf6 Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Sun, 28 Jul 2024 00:09:15 +0700 Subject: [PATCH 3/4] updated `GitHub Action` --- .github/workflows/tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b2a1e4c..20cf676b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,15 @@ on: jobs: tests: - runs-on: ubuntu-latest + name: Test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - windows-latest + - ubuntu-latest + - macos-latest steps: - name: Fetch Sources uses: actions/checkout@v4 From 1b9561f3884fe4a1d7bc8c0d34282bcec69776dc Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Sun, 28 Jul 2024 16:19:11 +0700 Subject: [PATCH 4/4] linter only runs on MR in `master` --- .github/workflows/linter.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fe1138e8..26bebbf7 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,9 +1,8 @@ name: Linter on: - push: - branches: [ master ] pull_request: + branches: [ master ] jobs: linter: