Skip to content

Commit

Permalink
Convert the CircleCI workflow to a GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jk0 committed May 17, 2024
1 parent 860fd64 commit 2b5f085
Show file tree
Hide file tree
Showing 3 changed files with 78 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/cache@v3.3.2
with:
key: v1-repo-${{ github.sha }}
path: UPDATE_ME
17 changes: 17 additions & 0 deletions .github/actions/run_yarn/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: run_yarn
runs:
using: composite
steps:
- name: restore_cache
uses: actions/cache@v3.3.2
with:
key: v1-yarn-${{ github.base_ref }}
path: UPDATE_ME
restore-keys: v1-yarn-${{ github.base_ref }}
- name: save_cache
uses: actions/cache@v3.3.2
with:
path: |
node_modules
~/.cache/yarn
key: v1-yarn-${{ github.base_ref }}
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: facebook/react-native-website/tests
on:
push:
branches:
- main
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: save_cache
uses: actions/cache@v3.3.2
with:
path: "~/react-native-website"
key: v1-repo-${{ github.sha }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: yarn
- uses: "./.github/actions/restore_cache_checkout"
- uses: "./.github/actions/run_yarn"
- uses: borales/actions-yarn@v4
with:
cmd: install
- uses: borales/actions-yarn@v4
with:
cmd: ci:lint
build:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: yarn
- uses: "./.github/actions/restore_cache_checkout"
- uses: "./.github/actions/run_yarn"
- uses: borales/actions-yarn@v4
with:
cmd: install
- uses: borales/actions-yarn@v4
with:
cmd: build

0 comments on commit 2b5f085

Please sign in to comment.