Skip to content

Commit

Permalink
Setup bors (#42)
Browse files Browse the repository at this point in the history
Implements #30. Is there anything else to set up for bors?


Co-authored-by: Hong Ge <[email protected]>
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
3 people committed Feb 3, 2022
1 parent 04e3e0c commit 9b64dd8
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: CI
on:
push:
branches:
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
# Build the main branch.
- main
pull_request:

jobs:
test:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Format

on:
push:
branches:
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
# Build the main branch.
- main

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1
- name: Format code
run: |
using Pkg
Pkg.add(; name="JuliaFormatter", uuid="98e50ef6-434e-11e9-1051-2b60c6c9e899")
using JuliaFormatter
format("."; verbose=true)
shell: julia --color=yes {0}
- uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: JuliaFormatter
fail_on_error: true
6 changes: 5 additions & 1 deletion .github/workflows/IntegrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name: IntegrationTest
on:
push:
branches:
# This is where pull requests from "bors r+" are built.
- staging
# This is where pull requests from "bors try" are built.
- trying
# Build the main branch.
- main
pull_request:

jobs:
test:
Expand Down
18 changes: 18 additions & 0 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
status = [
"Julia 1.% - ubuntu-latest - x64",
"Julia 1.% - macOS-latest - x64",
"Julia 1.% - windows-latest - x64",
"Julia 1 - ubuntu-latest - x64",
"Julia 1 - macOS-latest - x64",
"Julia 1 - windows-latest - x64",
"DynamicPPL.jl",
"format"
]
delete_merged_branches = true
# Require at least on approval of a project member.
required_approvals = 1
# Squash commits before merging.
use_squash_merge = true
# Uncomment this to use a two hour timeout.
# The default is one hour.
timeout_sec = 7200

0 comments on commit 9b64dd8

Please sign in to comment.