mirror of
https://github.com/samsonjs/csc360-a1-shell.git
synced 2026-03-25 08:45:52 +00:00
Simplify GitHub Actions workflow (#3)
This commit is contained in:
parent
0e19e57734
commit
3ab4f4c3f1
2 changed files with 10 additions and 12 deletions
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
|
|
@ -9,9 +9,6 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
working-directory: ruby
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
|
|
@ -21,13 +18,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ruby-version: 4.0.0
|
ruby-version: 4.0.0
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
- name: Bootstrap
|
||||||
|
run: make bootstrap
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: bundle exec rake test
|
run: make
|
||||||
- name: Run standard
|
|
||||||
run: bundle exec rake standard
|
|
||||||
- name: Install C dependencies
|
|
||||||
working-directory: .
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y libreadline-dev
|
|
||||||
- name: Run C tests
|
|
||||||
working-directory: .
|
|
||||||
run: make c
|
|
||||||
|
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -1,6 +1,13 @@
|
||||||
default: c ruby
|
default: c ruby
|
||||||
|
|
||||||
bootstrap:
|
bootstrap:
|
||||||
|
@if command -v apt-get >/dev/null 2>&1; then \
|
||||||
|
sudo apt-get update && sudo apt-get install -y libreadline-dev; \
|
||||||
|
elif command -v brew >/dev/null 2>&1; then \
|
||||||
|
brew list readline >/dev/null 2>&1 || brew install readline; \
|
||||||
|
else \
|
||||||
|
echo "Please install readline (e.g. libreadline-dev or Homebrew readline)."; \
|
||||||
|
fi
|
||||||
cd ruby && bundle install --jobs 8
|
cd ruby && bundle install --jobs 8
|
||||||
|
|
||||||
c:
|
c:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue