@@ -2,42 +2,85 @@ name: Unit Tests and Coverage
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88
99jobs :
1010 unit-tests :
11- runs-on : ubuntu-latest
12- # If we are going to use a prebuilt image like this we need a webwork repository on docker hub
13- container : drgrice1/webwork3
11+ runs-on : ubuntu-20.04
1412 steps :
15- - uses : actions/checkout@v2
13+ - name : Checkout webwork3 source code
14+ uses : actions/checkout@v2
15+
16+ # Disabling these things speeds up the setup considerably, and they are not needed for the throw away machine.
17+ - name : Disable man-db and initramfs updates
18+ run : |
19+ sudo sed -i 's/yes/no/g' /etc/initramfs-tools/update-initramfs.conf
20+ sudo rm -f /var/lib/man-db/auto-update
21+
22+ - name : Install dependencies
23+ run : |
24+ sudo apt-get update
25+ sudo apt-get install -qy --no-install-recommends --no-install-suggests \
26+ cpanminus \
27+ libarray-utils-perl \
28+ libcapture-tiny-perl \
29+ libclass-accessor-lite-perl \
30+ libclone-perl \
31+ libcrypt-ssleay-perl \
32+ libdata-dump-perl \
33+ libdatetime-format-strptime-perl \
34+ libdbd-sqlite3-perl \
35+ libdbix-class-inflatecolumn-serializer-perl \
36+ libdbix-class-perl \
37+ libdbix-dbschema-perl \
38+ libdevel-cover-perl \
39+ libexception-class-perl \
40+ libextutils-config-perl \
41+ libextutils-helpers-perl \
42+ libextutils-installpaths-perl \
43+ libfurl-perl \
44+ libhttp-parser-xs-perl \
45+ libio-socket-ssl-perl \
46+ liblist-moreutils-perl \
47+ libmodule-build-tiny-perl \
48+ libnet-ssleay-perl \
49+ libsql-translator-perl \
50+ libtest-exception-perl \
51+ libtest-harness-perl \
52+ libtext-csv-perl \
53+ libtry-tiny-perl \
54+ libyaml-libyaml-perl
55+ cpanm --sudo --notest \
56+ DBIx::Class::DynamicSubclass \
57+ Mojolicious \
58+ Mojolicious::Plugin::NotYAMLConfig \
59+ Mojolicious::Plugin::DBIC \
60+ Mojolicious::Plugin::Authentication \
61+ Devel::Cover::Report::Codecov
62+
1663 - name : Run perl unit tests
1764 env :
1865 HARNESS_PERL_SWITCHES : -MDevel::Cover
1966 run : |
2067 perl t/db/build_db.pl
2168 prove -r t
2269
23- # we probably don'te need to upload the codecov data
24- # - uses: actions/upload-artifact@v2
25- # with:
26- # name: coverage-report
27- # path: cover_db/
28-
2970 - name : Push coverage analysis
3071 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3172 env :
3273 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
3374 run : cover -report codecov
3475
35- # Install node (for npm) and use it to install eslint and stylelint dependencies .
36- - name : Use Node.js
76+ # Install node (for npm).
77+ - name : Set up node
3778 uses : actions/setup-node@v2
3879 with :
3980 node-version : ' 16'
81+
4082 - name : Install Dependencies
4183 run : npm ci
84+
4285 - name : Run typescript (client-side) tests
4386 run : npm run test
0 commit comments