Skip to content

Commit

Permalink
Create checkout-and-prep
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Aug 28, 2023
1 parent d844a70 commit 2b2a993
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 45 deletions.
31 changes: 31 additions & 0 deletions .github/actions/checkout-and-prep/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Checkout and prepare'
description: 'prep'
inputs:
node:
description: "Which node version?"
install-node:
description: "Install node?"
ruby:
description: "Which node version?"
install-ruby:
description: "Install ruby?"
runs:
using: "composite"
steps:
- uses: actions/checkout@v3

- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
uses: Daniel-Marynicz/[email protected]
with:
postgres_image_tag: 12-alpine
postgres_user: houdini_user
postgres_password: password
- name: "Install packages"
uses: "./.github/actions/install-packages"
with:
node: ${{ inputs.node }}
install-node: ${{ inputs.install-node }}
ruby: ${{ inputs.ruby }}
install-ruby: ${{ inputs.install-ruby }}


40 changes: 10 additions & 30 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,12 @@ jobs:
os: [ubuntu-20.04]
node: [14.19.1]
steps:
- uses: actions/checkout@v3
- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
uses: Daniel-Marynicz/[email protected]
with:
postgres_image_tag: 12-alpine
postgres_user: houdini_user
postgres_password: password
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- uses: ruby/setup-ruby@v1
- uses: ./.github/actions/checkout-and-prep
with:
ruby-version: ${{ env.ruby }}
bundler-cache: true
install-node: true
node: ${{ matrix.node }}
install-ruby: true
ruby: ${{ env.ruby }}
- run: bin/setup ci
- name: Generate JS routes
run: bin/rails js:routes:typescript
Expand All @@ -62,22 +52,12 @@ jobs:
os: [ubuntu-20.04]
node: [14.19.1]
steps:
- uses: actions/checkout@v3
- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
uses: Daniel-Marynicz/[email protected]
with:
postgres_image_tag: 12-alpine
postgres_user: houdini_user
postgres_password: password
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- uses: ruby/setup-ruby@v1
- uses: ./.github/actions/checkout-and-prep
with:
ruby-version: ${{ env.ruby }}
bundler-cache: true
install-node: true
node: ${{ matrix.node }}
install-ruby: true
ruby: ${{ env.ruby }}
- name: run setup
run: bin/setup ci
- name: Generate JS routes
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,12 @@ jobs:
node: [14.19.1]
ruby: [2.7.7]
steps:
- uses: actions/checkout@v3
- name: Setup PostgreSQL with PostgreSQL extensions and unprivileged user
uses: Daniel-Marynicz/[email protected]
with:
postgres_image_tag: 12-alpine
postgres_user: houdini_user
postgres_password: password
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- uses: ruby/setup-ruby@v1
- uses: ./.github/actions/checkout-and-prep
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
install-node: true
node: ${{ matrix.node }}
install-ruby: true
ruby: ${{ matrix.ruby }}
- name: install bess dependencies
run: |
cd gems/bess
Expand Down

0 comments on commit 2b2a993

Please sign in to comment.