Skip to content

Commit

Permalink
Merge pull request #29 from arkedge/introduce-ci
Browse files Browse the repository at this point in the history
Introduce CI
  • Loading branch information
sksat authored Dec 21, 2023
2 parents f16bf52 + ca6cd51 commit e4c0b8c
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: actionlint

permissions:
contents: read
pull-requests: write

on:
pull_request:
paths:
- '.github/workflows/**'

jobs:
actionlint:
name: actionlint with reviewdog
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.0

- name: actionlint
uses: reviewdog/action-actionlint@v1.40.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
50 changes: 50 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Rust

on:
push:
branches: [ main ]
pull_request:

permissions:
id-token: write
contents: read
checks: write
pull-requests: write

env:
CARGO_INCREMENTAL: 0

jobs:
rust:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4.1.0
with:
submodules: recursive

- name: Get Rust toolchain
id: toolchain
run: |
awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ steps.toolchain.outputs.toolchain }}
components: clippy, rustfmt

- name: cache dependencies
uses: Swatinem/rust-cache@v2.7.0

- name: reviewdog / clippy
uses: sksat/action-clippy@v0.4.0
with:
reporter: github-pr-review

- name: format
run: |
cargo fmt --all -- --check
- name: unit test
run: |
cargo test
22 changes: 22 additions & 0 deletions .github/workflows/validate-renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: validate renovate

on:
pull_request:
paths:
- 'renovate.json'
- '.github/workflows/validate-renovate.yml'

jobs:
validate-renovate:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4.1.0
- uses: actions/setup-node@v4.0.1

- name: install
run: |
npm install -g renovate
- name: validate
run: |
renovate-config-validator

0 comments on commit e4c0b8c

Please sign in to comment.