Skip to content

Commit

Permalink
Merge pull request #153 from Cray-HPE/active-spoiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsalmela committed Oct 13, 2023
2 parents df4af3f + be84cdc commit 73d114f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/shellspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
continue-on-error: false
shell: bash
run: |
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json
make load-sls
- name: Run shellspec
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ canitest.yml
canitestdb.json
canitestdb.log
canitest_export.csv

# support repos
hms-simulation-environment/
shellspec/
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,21 @@ shellspec:
validate-hardware-type-schemas:
go run ./pkg/hardwaretypes/validate pkg/hardwaretypes/hardware-types/schema pkg/hardwaretypes/hardware-types/

sim-setup:
@if ! [ -d hms-simulation-environment ]; then \
git clone https://github.com/Cray-HPE/hms-simulation-environment.git; \
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json; \
fi

load-sls:
spec/support/bin/setup_simulator.sh ./hms-simulation-environment ../testdata/fixtures/sls/no_hardware.json

spec-setup:
@if ! [ -d ./shellspec ]; then \
git clone https://github.com/shellspec/shellspec.git; \
ln -s "$(shell pwd)"/shellspec/shellspec /usr/local/bin/; \
fi

unittest: bin
GOOS=$(GOOS) GOARCH=$(GOARCH) go test -cover \
github.com/Cray-HPE/cani/internal/inventory \
Expand All @@ -149,7 +164,7 @@ unittest: bin
github.com/Cray-HPE/cani/internal/provider/csm/validate/checks \
github.com/Cray-HPE/cani/internal/provider/csm/validate/common

spec: bin
functional: bin
./spec/support/bin/cani_integrate.sh functional

integrate: bin
Expand All @@ -158,7 +173,7 @@ integrate: bin
edge: bin
./spec/support/bin/cani_integrate.sh edge

test: bin validate-hardware-type-schemas unittest spec integrate edge
test: bin validate-hardware-type-schemas unittest functional integrate edge

tools:
go install golang.org/x/lint/golint@latest
Expand Down

0 comments on commit 73d114f

Please sign in to comment.