This repository was archived by the owner on Sep 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +52
-11
lines changed
Expand file tree Collapse file tree 4 files changed +52
-11
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,22 @@ name: CI
33on : [push]
44
55jobs :
6- # TODO: make this use any changes in codeql-learninglab-check
7- test-courses-cpp-ctf-segv :
6+ test-courses-cpp-ctf-segv-actual :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - name : Checkout
10+ uses : actions/checkout@v1
11+
12+ - name : Login to docker
13+ run : docker login docker.pkg.github.com -u github-actions -p ${{ secrets.GITHUB_TOKEN }}
14+
15+ - name : Build Images & Run Queries
16+ run : cd courses/cpp/ctf-segv && ../../../scripts/test-course-actual.sh
17+ test-courses-cpp-ctf-segv-latest :
818 runs-on : ubuntu-latest
919 steps :
1020 - name : Checkout
1121 uses : actions/checkout@v1
1222
1323 - name : Build Images & Run Queries
14- run : cd courses/cpp/ctf-segv && ../../../scripts/test-course.sh
15- env :
16- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24+ run : cd courses/cpp/ctf-segv && ../../../scripts/test-course-latest.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Build the codeql-learninglab-check & course image, and run all queries in
4+ # the course to ensure the expected result
5+ #
6+ # Should be run with the cwd being the course folder
7+
8+ set -e
9+ set -x
10+
11+ # Extract the expected parent tag from course Dockerfile
12+ PARENT_TAG=$( head -n 1 image/Dockerfile | awk -F ' ' ' {print $2}' )
13+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
14+
15+ # Build codeql-learninglab-check
16+ docker pull $PARENT_TAG
17+
18+ # Run ./test-course-shared.sh
19+ $DIR /test-course-shared.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Build the codeql-learninglab-check & course image, and run all queries in
4+ # the course to ensure the expected result
5+ #
6+ # Should be run with the cwd being the course folder
7+
8+ set -e
9+ set -x
10+
11+ # Extract the expected parent tag from course Dockerfile
12+ PARENT_TAG=$( head -n 1 image/Dockerfile | awk -F ' ' ' {print $2}' )
13+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
14+
15+ # Build codeql-learninglab-check
16+ docker build -t $PARENT_TAG $DIR /../codeql-learninglab-check
17+
18+ # Run ./test-course-shared.sh
19+ $DIR /test-course-shared.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- # Build the codeql-learninglab-check & course image, and run all queries in
3+ # Build the course image, and run all queries in
44# the course to ensure the expected result
55#
66# Should be run with the cwd being the course folder
99set -x
1010
1111TMP=$( mktemp -d -t ci-XXXXXXXXXX)
12- # Extract the expected parent tag from course Dockerfile
13- PARENT_TAG=$( head -n 1 image/Dockerfile | awk -F ' ' ' {print $2}' )
1412TAG=ci-test
1513
16- # Build codeql-learninglab-check
17- docker build -t $PARENT_TAG ../../../codeql-learninglab-check
18-
1914# Build course image
2015docker build -t $TAG image
2116
You can’t perform that action at this time.
0 commit comments