Skip to content

Commit

Permalink
Actions (#13)
Browse files Browse the repository at this point in the history
* wip

* try v1

* caching

* try different cache

* test cashe

* add lint action

* fix lint action name

* add main push workflow

* fix lint step name
  • Loading branch information
LasseHels authored Nov 3, 2024
1 parent 670f147 commit b290252
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_call:

jobs:
lint:
name: Lint
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.82.0'
components: 'clippy'
- name: Cache Rust toolchain
uses: Swatinem/[email protected]
- name: Lint
run: make lint
13 changes: 13 additions & 0 deletions .github/workflows/main-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Main

on:
push:
branches: [main]

jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
lint:
name: Lint
uses: ./.github/workflows/lint.yml
12 changes: 12 additions & 0 deletions .github/workflows/pr-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Pull Requests

on:
pull_request:

jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
lint:
name: Lint
uses: ./.github/workflows/lint.yml
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
workflow_call:

jobs:
test:
name: Test
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.82.0'
- name: Cache Rust toolchain
uses: Swatinem/[email protected]
- name: Test
run: make test

0 comments on commit b290252

Please sign in to comment.