[npm-release] Automated release @quarkusio/code-quarkus library to npm #841
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: Frontend Tests | |
on: | |
push: | |
paths: | |
- 'frontend/**' | |
- 'library/**' | |
- '.github/**' | |
pull_request: | |
types: [assigned, opened, synchronize, reopened, ready_for_review, edited] | |
paths: | |
- 'frontend/**' | |
- 'library/**' | |
- '.github/**' | |
env: | |
# Workaround testsuite locale issue | |
LANG: en_US.UTF-8 | |
jobs: | |
build-test: | |
name: "Build & Test" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: n1hility/cancel-previous-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Cache Yarn Packages | |
id: yarn-cache | |
uses: actions/cache@v1 | |
with: | |
path: /.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('frontend/yarn.lock', 'lib/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.bvm | |
key: ${{ runner.os }}-bvm-bit | |
restore-keys: | | |
${{ runner.os }}-bvm-bit | |
- name: Install library packages | |
working-directory: library | |
run: yarn install --frozen-lockfile | |
- name: Build Library | |
working-directory: library | |
run: | | |
yarn test | |
yarn build | |
yarn run link | |
- name: Link Library | |
working-directory: frontend | |
run: yarn run link-library | |
- name: Install frontend | |
working-directory: frontend | |
run: yarn install --frozen-lockfile | |
- name: Build frontend | |
working-directory: frontend | |
run: | | |
REACT_APP_BACKEND_URL=https://stage.code.quarkus.io yarn build | |
echo ${{ github.event.number }} > ./build/pr-id.txt | |
- name: Publishing build directory for PR preview | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-dir | |
path: ./frontend/build | |
retention-days: 3 |