Skip to content

chore: add GITHUB_TOKEN to GitHub Actions workflow #36

chore: add GITHUB_TOKEN to GitHub Actions workflow

chore: add GITHUB_TOKEN to GitHub Actions workflow #36

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Set Environment Variables
run: |
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
echo "OS_PLATFORM=$(uname -s)" >> $GITHUB_ENV
echo "OS_RELEASE=$(uname -r)" >> $GITHUB_ENV
echo "OS_VERSION=$(uname -v)" >> $GITHUB_ENV
echo "BUILD_NAME=$GITHUB_WORKFLOW" >> $GITHUB_ENV
echo "BUILD_NUMBER=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
- run: npm ci
- run: npm run build
- run: npm run test
- run: npm run lint-check
- run: npm run format-check
- name: Publish Test Results
uses: ctrf-io/github-test-reporter@v1
with:
report-path: ctrf/*.json
summary-report: true
failed-report: false
fail-rate-report: false
flaky-report: false
flaky-rate-report: false
previous-results-report: true
insights-report: true
slowest-report: true
upload-artifact: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: always()