feat: updat ci reporting script #9
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: Test and Publish Cucumber Report | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests and generate Cucumber report | |
run: npm test | |
- name: Generate Cucumber report | |
run: npm run generate:report | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: 'results' | |
- name: Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/main' | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
# with: | |
# path: './cucumber_report.html' | |
# index_html: ./cucumber_report.html | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |