diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml new file mode 100644 index 00000000..dafff45c --- /dev/null +++ b/.github/workflows/go-test.yaml @@ -0,0 +1,30 @@ +name: go-test + +on: + push: + branches: + - main + - master + tags: + - '*' + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.21 + - name: Go code test + run: go test ./... diff --git a/.github/workflows/ci.yaml b/.github/workflows/java-test.yaml similarity index 75% rename from .github/workflows/ci.yaml rename to .github/workflows/java-test.yaml index b1134ae6..43a1a5c0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/java-test.yaml @@ -1,48 +1,24 @@ -name: CI +name: java-test + on: - pull_request: push: branches: - main - - "releases/*" + - master + tags: + - '*' + pull_request: + branches: + - main + paths: + - "java/**" + workflow_dispatch: permissions: contents: read jobs: - rust-test: - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Git checkout - uses: actions/checkout@v2 - - name: Install rust nightly toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.74 - override: true - components: clippy, rustfmt - - name: Rust code test - run: cargo test - - go-test: - strategy: - matrix: - os: [macos-latest, ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Git checkout - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.21 - - name: Go code test - run: go test ./... - - java-test: + test: permissions: actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows contents: read # for actions/checkout to fetch code @@ -118,4 +94,4 @@ jobs: with: name: java-artifact-${{ matrix.classifier }} path: | - java/target/*.jar \ No newline at end of file + java/target/*.jar diff --git a/.github/workflows/rust-test.yaml b/.github/workflows/rust-test.yaml new file mode 100644 index 00000000..d3292c81 --- /dev/null +++ b/.github/workflows/rust-test.yaml @@ -0,0 +1,32 @@ +name: rust-test + +on: + push: + branches: + - main + - master + tags: + - '*' + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + rust-test: + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Install rust nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.74 + override: true + components: clippy, rustfmt + - name: Rust code test + run: cargo test