This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (48 loc) · 2.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Ensure the test course and libraries can be imported.
name: CI
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
test_import:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Install latest Tutor
run: pip install tutor
- name: Disable tutor-mfe
run: |
tutor plugins disable mfe
tutor config save
- name: Launch Tutor
run: tutor local launch --non-interactive
# We need a user to exist, since all libraries need an owner.
# The Makefile assigns the library to the user named 'admin', so
# we name create an 'admin' user here.
- name: create admin user
run: tutor local do createuser admin [email protected] --password admin --staff --superuser
- name: import course & libraries
run: make import
source_and_dist_match:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Unpack tars
run: make unpack
- name: Confirm that unpacked tars match source
run: |
git update-index --refresh
git diff-index HEAD -- && {
echo -e "\033[0;32m=============================================================================\033[0m"
echo -e "\033[0;32mUnpacked .tar.gz files do match source XML, all is well. \033[0m"
echo -e "\033[0;32m=============================================================================\033[0m"
exit 0
}
echo -e "\033[0;31m=============================================================================\033[0m"
echo -e "\033[0;31mERROR: Unpacked .tar.gz files do not match source XML! See differences below:\033[0m"
echo -e "\033[0;31m=============================================================================\033[0m"
git diff