Skip to content

Commit 02b9c3e

Browse files
committed
Add GitHub Actions for testing and linting
1 parent b9dff4e commit 02b9c3e

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/linting.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Linting
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
run-linters:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Ruby and install gems
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
bundler-cache: true
21+
ruby-version: 3.4
22+
23+
- name: Lint Ruby code
24+
run: |
25+
bin/standardrb

.github/workflows/tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
run-tests:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
RACK_ENV: test
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Ruby and install gems
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
bundler-cache: true
24+
ruby-version: 3.4
25+
26+
- name: Run tests
27+
run: |
28+
bin/rspec

0 commit comments

Comments
 (0)