Skip to content

Commit

Permalink
Merge pull request #298 from hathitrust/action-updates
Browse files Browse the repository at this point in the history
Updated the build.yaml file and tests file
  • Loading branch information
Ronster2018 authored Mar 21, 2024
2 parents 995769b + bb24cf5 commit ed3107a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 48 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/build-main.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/build-manual.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
workflow_run:
workflows: ['Run Tests']
branches: ['main']
types: [completed]

workflow_dispatch:
inputs:
img_tag:
description: Docker Image Tag
ref:
description: Revision or Branch to build
default: main
push_latest:
description: Set True if the build is for the latest version
type: boolean
required: false
default: false
platforms:
description: Platforms to build for
type: choice
default: linux/amd64,linux/arm64
options:
- linux/amd64,linux/arm64
- linux/amd64
- linux/arm64
rebuild:
description: Rebuild this image?
type: boolean
default: false

jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Build Image
uses: hathitrust/github_actions/[email protected]
with:
image: ghcr.io/hathitrust/holdings-client-unstable
dockerfile: Dockerfile.prod
img_tag: ${{ inputs.img_tag }}
tag: ${{ inputs.ref }}
push_latest: ${{ inputs.push_latest}}
registry_token: ${{ github.token }}
rebuild: ${{ inputs.rebuild }}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run CI
name: Run Tests

on:
pull_request:
Expand All @@ -10,16 +10,16 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up tests
run: ./bin/setup/setup_test.sh

- name: Run standardrb
run: docker-compose run --rm dev bundle exec standardrb
run: docker compose run --rm dev bundle exec standardrb

- name: Run tests
run: docker-compose run --rm -e MONGOID_ENV=test dev bin/setup/wait-for mariadb:3306 pushgateway:9091 -- bundle exec rspec
run: docker compose run --rm -e MONGOID_ENV=test dev bin/setup/wait-for mariadb:3306 pushgateway:9091 -- bundle exec rspec

- name: Report to Coveralls
uses: coverallsapp/[email protected]
Expand Down

0 comments on commit ed3107a

Please sign in to comment.