Testing GitHub Actions #4
Workflow file for this run
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: Dashboard Next.js Application | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
paths: | |
- src/dashboard/** | |
pull_request: | |
branches: | |
- main | |
- dev | |
paths: | |
- src/dashboard/** | |
jobs: | |
build-app-editor: | |
runs-on: ubuntu-latest | |
env: | |
CI: true | |
working-directory: ./src/dashboard | |
strategy: | |
matrix: | |
node-version: | |
- "20.8.1" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Extract Branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: Use NodeJs ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update Browsers List | |
run: npx update-browserslist-db@latest | |
working-directory: ${{ env.working-directory }} | |
- name: Install Dependencies | |
run: npm install | |
working-directory: ${{ env.working-directory }} | |
- name: Linting | |
run: npm run lint | |
working-directory: ${{ env.working-directory }} | |
# - name: Unit Tests | |
# run: npm run test | |
# working-directory: ${{ env.working-directory }} | |
- name: Building | |
run: npm run build | |
working-directory: ${{ env.working-directory }} |