Skip to content

Commit

Permalink
feature: setup github workflow and vscode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ando committed Aug 12, 2023
1 parent 1d8c6eb commit 61c74d5
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: cargo
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
versioning-strategy: increase-if-necessary
reviewers:
- "iamando"
assignees:
- "iamando"
labels:
- "dependencies"
- "cargo"
17 changes: 17 additions & 0 deletions .github/workflows/assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: assign

on:
pull_request:
types: [opened, reopened]

jobs:
assign-labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GH_TOKEN }}
labels: |
automated
pull-request
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: build

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
components: clippy
- run: cargo clippy

compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- run: cargo check

test:
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macOS-latest
rust:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}
needs: [compile]
steps:
- uses: actions/checkout@v2
- uses: ATiltedTree/setup-rust@v1
with:
rust-version: ${{ matrix.rust }}
- run: cargo test
17 changes: 17 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pull-request

on:
push:
branches-ignore:
- master

jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jascodes/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
PULL_REQUEST_BRANCH: master
PULL_REQUEST_TITLE: ${{ github.event.commits[0].message }}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["rust-lang.rust-analyzer"]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.eol": "\n",
"rust-analyzer.linkedProjects": ["./Cargo.toml"],
"rust-analyzer.showUnlinkedFileNotification": false
}

0 comments on commit 61c74d5

Please sign in to comment.