Skip to content

Commit

Permalink
Merge pull request #1 from robandpdx-org/convert-facebook-react-nativ…
Browse files Browse the repository at this point in the history
…e-website-to-actions

do it
  • Loading branch information
jk0 authored May 10, 2024
2 parents 860fd64 + 345d8f2 commit 54b01f0
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/restore_cache_checkout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: restore_cache_checkout
runs:
using: composite
steps:
- name: restore_cache
uses: actions/[email protected]
with:
key: v1-repo-{{ .Environment.${{ github.sha }} }}
path: UPDATE_ME
21 changes: 21 additions & 0 deletions .github/actions/run_yarn/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: run_yarn
runs:
using: composite
steps:
- name: restore_cache
uses: actions/[email protected]
with:
key: v1-yarn-{{ .Branch }}
path: UPDATE_ME
restore-keys: v1-yarn-{{ .Branch }}
- name: Yarn Install
run: yarn install --frozen-lockfile --no-progress --non-interactive --cache-folder ~/.cache/yarn
working-directory: "~/react-native-website"
shell: bash
- name: save_cache
uses: actions/[email protected]
with:
path: |-
node_modules
~/.cache/yarn
key: v1-yarn-{{ .Branch }}
49 changes: 49 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: facebook/react-native-website/tests
on:
push:
branches:
- main
jobs:
setup:
defaults:
run:
working-directory: "~/react-native-website"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: save_cache
uses: actions/[email protected]
with:
path: "~/react-native-website"
key: v1-repo-{{ .Environment.${{ github.sha }} }}
lint:
defaults:
run:
working-directory: "~/react-native-website/website"
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: "./.github/actions/restore_cache_checkout"
- uses: "./.github/actions/run_yarn"
- run: yarn ci:lint
build:
defaults:
run:
working-directory: "~/react-native-website/website"
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- uses: actions/[email protected]
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- uses: "./.github/actions/restore_cache_checkout"
- uses: "./.github/actions/run_yarn"
- run: yarn build

0 comments on commit 54b01f0

Please sign in to comment.