Skip to content

Commit

Permalink
Use local action for cloning and setting up node.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauravuo committed Mar 25, 2022
1 parent 7a423fd commit b83f0a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
13 changes: 13 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Setup env"
description: "Sets up node and installs yarn dependencies"
runs:
using: "composite"
steps:
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- run: yarn
20 changes: 2 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- run: yarn
- uses: ./.github/actions/setup
- run: yarn test --coverage
- uses: codecov/codecov-action@v2

export-test:
runs-on: ubuntu-latest
name: Test exported build
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- uses: actions/setup-node@v2
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- name: install deps
run: yarn install
- uses: ./.github/actions/setup
- name: export files
run: yarn export
- name: smoke test for export output
Expand Down

0 comments on commit b83f0a3

Please sign in to comment.