diff --git a/.github/workflows/build-lint.yml b/.github/workflows/build-lint.yml new file mode 100644 index 0000000..512e001 --- /dev/null +++ b/.github/workflows/build-lint.yml @@ -0,0 +1,58 @@ +name: Build and Lint +on: + push: + tags: + - v* + branches: + - master + - main + pull_request: +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + components: clippy + - name: Build | Lint + run: cargo clippy + compile: + name: Compile + runs-on: ubuntu-latest + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + - name: Build | Compile + run: cargo check + test: + name: Test + matrix: + strategy: + os: + - ubuntu-latest + - windows-latest + - macOS-latest + rust: + - stable + - beta + - nightly + runs-on: ${{ matrix.os }} + needs: [compile] + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: ${{ matrix.rust }} + - name: Build | Compile + run: cargo test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 72306ab..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: build -on: - push: - tags: - - v* - branches: - - master - - main - pull_request: -jobs: - build: - runs-on: ubuntu-16.04 - strategy: - matrix: - go: [ '1.14', '1.13' ] - name: Sepia Build - steps: - - uses: actions/checkout@v2 - - name: Setup go - uses: actions/setup-go@v1 - with: - go-version: ${{ matrix.go }} - - run: go build main.go \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 813d529..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: lint -on: - push: - tags: - - v* - branches: - - master - - main - pull_request: -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: golangci-lint - uses: golangci/golangci-lint-action@v2 - with: - # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.29 - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 - - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true \ No newline at end of file