separate groups for typescript (#1016) #2402
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: Parallel build | |
on: | |
push: | |
branches-ignore: | |
- gh-pages | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Print Node JS version | |
run: | | |
node -v | |
- name: Yarn Install | |
run: | | |
yarn install | |
- name: Lint | |
run: | | |
yarn lint | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
# https://github.com/dependabot/dependabot-core/issues/3253#issuecomment-852541544 | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Print Node JS version | |
run: | | |
node -v | |
- name: Yarn Install | |
run: | | |
yarn install | |
- name: Tests | |
run: | | |
export NG_CLI_ANALYTICS=false | |
yarn test | |
test-and-sonar: | |
name: Run Tests and Sonar Analysis | |
runs-on: ubuntu-latest | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Print Node JS version | |
run: | | |
node -v | |
- name: Yarn Install | |
run: | | |
yarn install | |
- name: Sonar version | |
run: | | |
yarn sonar --version | |
- name: Tests and Sonar | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: | | |
./sonar-token-check.sh | |
export NG_CLI_ANALYTICS=false | |
yarn test | |
yarn sonar | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Print Node JS version | |
run: | | |
node -v | |
- name: Yarn Install | |
run: | | |
yarn install | |
- name: Build | |
run: | | |
yarn build | |
- name: Archive built project | |
uses: actions/upload-artifact@v4 | |
with: | |
name: timeismoney-dist | |
path: dist | |
retention-days: 1 | |
deploy: | |
# make it work with skipped jobs: https://github.com/github/docs/issues/4822#issuecomment-826617890 | |
if: ${{ (github.ref == 'refs/heads/main') && !failure() && !cancelled() }} | |
needs: [lint, test, test-and-sonar, build] | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Build Project | |
uses: actions/download-artifact@v4 | |
with: | |
name: timeismoney-dist | |
path: dist | |
- name: List Current Folder | |
run: ls -R | |
- name: Deploy | |
# https://github.com/JamesIves/github-pages-deploy-action#configuration- | |
uses: JamesIves/[email protected] | |
with: | |
repository-name: wiiitek/timeismoney | |
branch: gh-pages | |
folder: ./dist/timeismoney | |
token: ${{ secrets.GH_TOKEN }} |