Nuxt/.github/workflows/test.yml

54 lines
1.1 KiB
YAML
Raw Normal View History

name: test
2021-03-18 14:26:41 +00:00
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
2021-03-18 14:26:41 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [14]
steps:
- uses: actions/setup-node@v2
2021-03-18 14:26:41 +00:00
with:
node-version: ${{ matrix.node }}
- name: checkout
uses: actions/checkout@master
- uses: actions/cache@v2
id: yarn-cache
with:
path: .yarn
2021-03-18 14:26:41 +00:00
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
2021-04-09 15:58:43 +00:00
${{ runner.os }}-yarn-
2021-03-18 14:26:41 +00:00
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
2021-04-09 15:58:43 +00:00
run: yarn --immutable
2021-04-09 13:48:39 +00:00
2021-03-18 14:26:41 +00:00
- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test:presets
- name: Release Edge
2021-07-15 10:49:01 +00:00
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip-release]')
run: ./scripts/release-edge.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}