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:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ruby
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Set up Ruby
|
||||
|
|
@ -21,13 +18,7 @@ jobs:
|
|||
with:
|
||||
ruby-version: 4.0.0
|
||||
bundler-cache: true
|
||||
- name: Bootstrap
|
||||
run: make bootstrap
|
||||
- name: Run tests
|
||||
run: bundle exec rake test
|
||||
- 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
|
||||
run: make
|
||||
|
|
|
|||
7
Makefile
7
Makefile
|
|
@ -1,6 +1,13 @@
|
|||
default: c ruby
|
||||
|
||||
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
|
||||
|
||||
c:
|
||||
|
|
|
|||
Loading…
Reference in a new issue