Skip to content

Commit

Permalink
add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ankithads committed Jun 14, 2024
1 parent 0ea7359 commit 58e7564
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 59 deletions.
59 changes: 0 additions & 59 deletions .circleci/config.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Run Specs

on:
push:
permissions:
contents: read
# We need write access to the id-token to use workload identity federation
id-token: write
packages: read
# Needed for getting PR labels
pull-requests: read


env:
PGDATABASE: que-test
PGUSER: ubuntu
PGPASSWORD: password
PGHOST: localhost

jobs:
bundle_install_and_cache:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gocardless/github-actions/actions/ruby-bundle-install@master
with:
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }}
robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
install_postgres_lib: "yes"

rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby_version: ["2.6", "2.7", "3.0"]

services:
postgres:
image: postgres:11.2
env:
POSTGRES_DB: que-test
POSTGRES_USER: ubuntu
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
needs:
- bundle_install_and_cache

steps:
- uses: actions/checkout@v2
- uses: gocardless/github-actions/actions/ruby-bundle-install@master
with:
known_hosts: ${{ secrets.KNOWN_HOSTS_GITHUB_KEY }}
robot_ssh_key: ${{ secrets.ROBOT_READONLY_SSH_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Specs
run: |
bundle exec rspec

0 comments on commit 58e7564

Please sign in to comment.