用 GitHub Actions 做 CI/CD:做 unit test, 生成 coverage, 並且上傳到 coveralls.io
I was the main web front-end engineer responsible for developing and maintaining the customer-facing platform for WisdomHall (品學堂) in 2024 Q3 Q4, code reviewed by CTO and a senior engineer. http://learning.wisdomhall.com.tw has total active 257k users, according to their Facebook post: https://www.facebook.com/share/p/1MnjbwZxCV/ My tech stack includes JavaScript, Vue 2, Nuxt 2, git, and Docker.
可以在這個 branch 看到範例: https://github.com/sunpochin/pf-audiophile/tree/github-action-cicd
我是請 chatGPT 做出來的。
重點是我在這邊生成 coverage 資料。
- name: Run tests
run: yarn test:unit --coverage
在這邊上傳到 coveralls app:
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.2.3
with: github-token: ${{ secrets.GITHUB_TOKEN }}
就這樣了。
這裡可以看到正式的範例教學:https://github.com/marketplace/actions/coveralls-github-action