test.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ---
  2. when:
  3. - event: [pull_request, tag]
  4. - event: [push, manual]
  5. branch:
  6. - ${CI_REPO_DEFAULT_BRANCH}
  7. steps:
  8. - name: eslint
  9. image: docker.io/library/node:lts
  10. commands:
  11. - npm install --quiet --no-progress
  12. - npm run lint:js
  13. environment:
  14. FORCE_COLOR: "true"
  15. - name: assets
  16. image: docker.io/library/node:lts
  17. depends_on: [eslint]
  18. commands:
  19. - npm install --quiet --no-progress
  20. - npm run build
  21. environment:
  22. FORCE_COLOR: "true"
  23. - name: testbuild
  24. image: quay.io/thegeeklab/hugo:0.136.5
  25. depends_on: [assets]
  26. commands:
  27. - mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME}
  28. - hugo --panicOnWarning -s exampleSite/ -b http://localhost:8000/
  29. - name: html-validation
  30. image: docker.io/library/node:lts
  31. depends_on: [testbuild]
  32. commands:
  33. - npm install --quiet --no-progress
  34. - npm run lint:html
  35. environment:
  36. FORCE_COLOR: "true"
  37. - name: link-validation
  38. image: docker.io/lycheeverse/lychee
  39. depends_on: [testbuild]
  40. commands:
  41. - lychee --no-progress --format detailed exampleSite/content/ README.md
  42. - name: page-validation
  43. image: quay.io/thegeeklab/lhci:0.14
  44. depends_on: [testbuild]
  45. commands:
  46. - lhci autorun
  47. environment:
  48. LHCI_SERVER_URL: https://ci-artifact.rknet.org/${CI_REPO_NAME}/