Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

chore: add pr gh action #2

chore: add pr gh action

chore: add pr gh action #2

Workflow file for this run

name: PR
on:
pull_request:
branches:
- main
jobs:
cypress-run:
name: Cypress Tests
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: knapsack/cypress-php:latest
options: --user 1001
env:
CYPRESS_CACHE_FOLDER: ${{ runner.temp }}/cypress_cache

Check failure on line 17 in .github/workflows/pr.yml

View workflow run for this annotation

GitHub Actions / PR

Invalid workflow file

The workflow is not valid. .github/workflows/pr.yml (Line: 17, Col: 31): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.temp
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install Dependencies
run: yarn install --cache-folder ${{ env.CYPRESS_CACHE_FOLDER }} --frozen-lockfile --prefer-offline
- name: Cypress Run
run: yarn cypress run
env:
CYPRESS_BASE_URL: http://localhost:3000
build:
name: Build & Release
needs: [cypress-run]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Handle Cache
uses: actions/cache@v2
id: cache
with:
path: |
node_modules
~/.cache/yarn
key: node-deps-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --cache-folder ~/.cache/yarn --prefer-offline --frozen-lockfile --force-node-version=16
- name: Run Full Build
run: yarn build
- name: Run Knapsack Test
run: yarn test
- name: Release
run: yarn auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}