From ed3edf77bdda59c403c802be980a8f440ea7a572 Mon Sep 17 00:00:00 2001 From: "Y.Matsuda" Date: Sun, 31 Mar 2024 10:46:15 +0900 Subject: [PATCH] add lint and test workflow on github actions --- .github/workflows/lint-and-test.yml | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/lint-and-test.yml diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml new file mode 100644 index 0000000..1aef145 --- /dev/null +++ b/.github/workflows/lint-and-test.yml @@ -0,0 +1,50 @@ +name: lint-and-test + +on: push + +jobs: + lint: + name: Run lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + - name: Run lint + run: make install-lint-tools lint + lint-exporter: + name: Run lint for exporter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + - name: Run lint for exporter + run: make install-lint-tools lint-exporter + + test: + name: Run test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + - name: Run test + run: make test + test-exporter: + name: Run test for exporter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: './go.mod' + - name: Run test for exporter + run: make test-exporter