fix: add release branch in the package.json #26
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: Build and Test | |
on: | |
push: | |
env: | |
dependency_cache_prefix: v1-dependencies- | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Chekout Code | |
uses: actions/checkout@v2 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.8.1' | |
- name: Get Yarn Cache Directory Path | |
id: yarn-cache-dir-path | |
run: | | |
echo "::set-output name=dir::$(yarn cache dir)" | |
echo "::set-output name=version::$(yarn -v)" | |
shell: bash | |
- name: Cache Dependencies | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ env.dependency_cache_prefix }}${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ env.dependency_cache_prefix }} | |
- name: Install Packages | |
run: yarn install --frozen-lockfile | |
shell: bash | |
- name: Compress Package Dependencies | |
run: tar -cvf node_modules.tar node_modules | |
- name: Upload Package Dependencies | |
uses: actions/upload-artifact@v2 | |
with: | |
name: package-compress | |
path: node_modules.tar | |
retention-days: 1 | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Chekout Code | |
uses: actions/checkout@v2 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20" | |
- name: Download Package Dependencies | |
uses: actions/download-artifact@v2 | |
with: | |
name: package-compress | |
- name: Uncompress Package Dependencies | |
run: | | |
tar -xvf node_modules.tar | |
rm -f node_modules.tar | |
- name: Build | |
run: yarn run build | |
- name: Test | |
run: yarn test |