Skip to content

Commit

Permalink
Update test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
anngvu committed Feb 15, 2024
1 parent 93eec59 commit 78953db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/schematic-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
Expand Down Expand Up @@ -46,25 +46,28 @@ jobs:
name: Test with schematic
if: "!contains( github.event.pull_request.labels.*.name, 'skip tests')"
needs: [build]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
env:
SCHEMATIC_SERVICE_ACCT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}
permissions:
pull-requests: write
strategy:
matrix:
schematic-version: [23.9.1]
schematic-version: [24.1.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1

- name: Setup schematic
id: setup-schematic
run: pip3 install schematicpy==${{ matrix.schematic-version }}
run: pip install schematicpy==${{ matrix.schematic-version }}

- name: Sanity-check successful installation and version
run: pip show schematicpy

- name: Test generate
working-directory: tests/generate
continue-on-error: true
Expand Down
3 changes: 1 addition & 2 deletions tests/generate/basic_templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ mkdir -p $LOG_DIR
for i in ${!TEMPLATES[@]}
do
echo ">>>>>>> Generating ${TEMPLATES[$i]}"
schematic manifest --config config.yml \
get -dt ${TEMPLATES[$i]} --title ${TEMPLATES[$i]} -s | tee $LOG_DIR/${TEMPLATES[$i]%.*}_log.txt
schematic manifest --config ./config.yml get -dt "${TEMPLATES[$i]}" --title "${TEMPLATES[$i]}" -s | tee $LOG_DIR/${TEMPLATES[$i]%.*}_log
sleep $SLEEP_THROTTLE
done

Expand Down
2 changes: 1 addition & 1 deletion tests/test-suite-report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ md_link <- function (url) {

```{r parse-generation-logs, echo=FALSE}
gen_logs <- list.files("generate/logs", full.names = TRUE)
templates <- gsub("_.*", "", basename(gen_logs))
templates <- gsub("_log", "", basename(gen_logs))
gen_test_results <- lapply(gen_logs, readLines)
gen_test_links <- sapply(gen_test_results, md_link)
gen_test_reaction <- sapply(lengths(gen_test_results), test_reaction)
Expand Down

0 comments on commit 78953db

Please sign in to comment.