Scrollable task spinner #1013
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: 'Javascript' | |
on: | |
push: | |
branches: [ latest, next ] | |
pull_request: | |
branches: [ latest, next ] | |
concurrency: | |
group: javascript-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build | |
path: dist | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Lint | |
continue-on-error: true | |
run: yarn lint -f @microsoft/sarif -o eslint-results.sarif | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: eslint-results.sarif | |
wait-for-processing: true | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
# - name: Type check tests | |
# run: yarn test:types --pass-with-no-tests | |
- name: Run tests | |
run: yarn test --coverage | |
- name: Upload coverage artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage | |
path: coverage | |
e2e: | |
runs-on: ${{ matrix.os }} | |
needs: [ build ] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
- 'windows-latest' | |
- 'macos-latest' | |
node: | |
- 16 | |
- 18 | |
- 20 | |
packageManager: | |
- npm | |
- yarn | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node }}.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: dist | |
- name: Setup git | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
- name: Run E2E tests | |
run: yarn e2e --threads --single-thread -t ${{ matrix.packageManager }} | |
complete: | |
if: ${{ github.event_name == 'pull_request' && always() }} | |
runs-on: ubuntu-latest | |
needs: [ lint, tests, e2e ] | |
steps: | |
- name: Failed | |
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
run: exit 1 | |
- name: Success | |
run: echo 'You are soooo curious ;)' | |
publish: | |
if: ${{ github.event_name == 'push' }} | |
name: Publish to npm | |
runs-on: ubuntu-latest | |
environment: npm | |
needs: [ lint, tests, e2e ] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: build | |
path: dist | |
- name: Publish ${{ github.ref_name }} | |
run: yarn npm publish --access public --tag ${{ github.ref_name }} --tolerate-republish | |
env: | |
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
sonarcloud: | |
if: ${{ !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'renovate/') }} | |
runs-on: ubuntu-latest | |
needs: [ tests ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download coverage artifacts | |
uses: actions/download-artifact@v3 | |
continue-on-error: true | |
with: | |
name: coverage | |
path: coverage | |
- name: Load package.json | |
id: info | |
run: echo "version=$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT | |
- name: Sonarcloud | |
uses: sonarsource/[email protected] | |
with: | |
args: > | |
-Dsonar.projectVersion=${{ steps.info.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
release: | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
needs: [ publish ] | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read package.json | |
id: info | |
run: echo "version=$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT | |
- name: Tag version | |
id: tag | |
run: | | |
echo "::group::git fetch --tags" | |
git fetch --tags | |
echo "::endgroup::" | |
if [[ $(git tag -l $VERSION) == $VERSION ]]; then | |
echo "::notice::git tag $VERSION already exists" | |
else | |
git config user.name github-actions | |
git config user.email [email protected] | |
git tag $VERSION | |
git push --tags | |
echo "notes=true" >> $GITHUB_OUTPUT | |
fi | |
env: | |
VERSION: v${{ steps.info.outputs.version }} | |
- name: Release notes | |
if: ${{ steps.tag.outputs.notes }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ steps.info.outputs.version }} | |
tag_name: v${{ steps.info.outputs.version }} | |
draft: true | |
generate_release_notes: true |