This repository was archived by the owner on Sep 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 11
11
uses : actions/checkout@v1
12
12
13
13
- name : Build Images & Run Queries
14
- run : cd courses/cpp/ctf-segv/image && ./ test.sh
14
+ run : cd courses/cpp/ctf-segv && ../../../scripts/ test-course .sh
15
15
env :
16
16
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- # Test that the queries in ../answers produce the expected results
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
4
7
5
8
set -e
6
9
set -x
7
10
8
11
TMP=$( mktemp -d -t ci-XXXXXXXXXX)
9
12
# Extract the expected parent tag from course Dockerfile
10
- PARENT_TAG=$( head -n 1 Dockerfile | awk -F ' ' ' {print $2}' )
13
+ PARENT_TAG=$( head -n 1 image/ Dockerfile | awk -F ' ' ' {print $2}' )
11
14
TAG=ci-test
12
15
13
16
# Build codeql-learninglab-check
14
- docker build -t $PARENT_TAG ../../../../ codeql-learninglab-check
17
+ docker build -t $PARENT_TAG ../../../codeql-learninglab-check
15
18
16
19
# Build course image
17
- docker build -t $TAG .
20
+ docker build -t $TAG image
18
21
19
22
# Prepare temporary folder to mount into docker
20
23
mkdir -p $TMP
21
- cp -R ../ answers $TMP /answers
24
+ cp -R answers $TMP /answers
22
25
echo " {}" > $TMP /event.json
23
26
24
27
# Run docker image
You can’t perform that action at this time.
0 commit comments