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
3
3
on : [push]
4
4
5
5
jobs :
6
- # TODO: make this use any changes in codeql-learninglab-check
7
- test-courses-cpp-ctf-segv :
6
+ test-courses-cpp-ctf-segv-actual :
8
7
runs-on : ubuntu-latest
9
8
steps :
10
9
- name : Checkout
11
10
uses : actions/checkout@v1
12
11
13
12
- name : Build Images & Run Queries
14
- run : cd courses/cpp/ctf-segv && ../../../scripts/test-course.sh
15
- env :
16
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
13
+ run : cd courses/cpp/ctf-segv && ../../../scripts/test-course-actual.sh
14
+ test-courses-cpp-ctf-segv-latest :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Checkout
18
+ uses : actions/checkout@v1
19
+
20
+ - name : Login to docker
21
+ run : docker login docker.pkg.github.com -u github-actions -p ${{ secrets.GITHUB_TOKEN }}
22
+
23
+ - name : Build Images & Run Queries
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-only.sh
19
+ $DIR /test-course-only.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-only.sh
19
+ $DIR /test-course-only.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Build the codeql-learninglab-check & course image, and run all queries in
3
+ # Build the course image, and run all queries in
4
4
# the course to ensure the expected result
5
5
#
6
6
# Should be run with the cwd being the course folder
9
9
set -x
10
10
11
11
TMP=$( 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}' )
14
12
TAG=ci-test
15
13
16
- # Build codeql-learninglab-check
17
- docker build -t $PARENT_TAG ../../../codeql-learninglab-check
18
-
19
14
# Build course image
20
15
docker build -t $TAG image
21
16
You can’t perform that action at this time.
0 commit comments