Corrected the license type from MPL-2.0 to CCO-1.0 #1722
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing, building, serving | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Install all npm packages | |
run: npm ci | |
- name: Lint files | |
run: npm test | |
- name: Build all | |
run: npm run build | |
- name: Start server | |
run: | | |
npm run start-server > /tmp/stdout.log 2> /tmp/stderr.log & | |
sleep 3 | |
curl --retry-connrefused --retry 5 http://localhost:9090 > /dev/null | |
- name: View some built pages | |
run: | | |
# This depends on actual content. | |
# Arbitrary pages picked. The tests just makes sure they 200 OK | |
curl --fail --silent http://localhost:9090/pages/tabbed/video.html > /dev/null | |
curl --fail --silent http://localhost:9090/pages/js/array-foreach.html > /dev/null | |
curl --fail --silent http://localhost:9090/pages/css/background.html > /dev/null | |
- name: Debug server's stdout and stderr if tests failed | |
if: failure() | |
run: | | |
echo "STDOUT..................................................." | |
cat /tmp/stdout.log | |
echo "" | |
echo "STDERR..................................................." | |
cat /tmp/stderr.log |