Skip to content

Commit

Permalink
Merge pull request #6 from opticdev/chore/enable-ci-2
Browse files Browse the repository at this point in the history
chore: ci take 2
  • Loading branch information
notnmeyer authored Aug 29, 2023
2 parents 807508e + 8fb9e44 commit a114ac6
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 99 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/app-bookstore-api.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/bookstore-api-optic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: bookstore-api-optic
on:
push:
branches:
- main
paths:
- apps/bookstore-api/**
pull_request:
paths:
- apps/bookstore-api/**
workflow_call:

defaults:
run:
working-directory: apps/bookstore-api

jobs:
diff-all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: yarn install

- name: Generate Spec
run: yarn generate-spec

- uses: opticdev/action@v1
with:
# Your Optic Cloud Token
optic_token: ${{ secrets.OPTIC_TOKEN }}

# A GitHub token with access to create comments on pull requests
github_token: ${{ secrets.GITHUB_TOKEN }}

# If true, standard check failures will cause this action to fail.
# If false, standard check failures will show in PR comments and
# in Optic Cloud but will not cause the action to fail
standards_fail: true

# If you have more than one spec, separate matches with commas
# (openapi.yml,other.yml)
additional_args: --match apps/bookstore-api/openapi.yml

compare_from_pr: cloud:default
compare_from_push: cloud:default
31 changes: 31 additions & 0 deletions .github/workflows/bookstore-optic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: bookstore-optic
on:
push:
branches:
- main
paths:
- ci/github-actions-bookstore/**
pull_request:
paths:
- ci/github-actions-bookstore/**
workflow_call:

jobs:
diff-all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: opticdev/action@v1
with:
# Your Optic Cloud Token
optic_token: ${{ secrets.OPTIC_TOKEN }}

# A GitHub token with access to create comments on pull requests
github_token: ${{ secrets.GITHUB_TOKEN }}

# If true, standard check failures will cause this action to fail.
# If false, standard check failures will show in PR comments and
# in Optic Cloud but will not cause the action to fail
standards_fail: true
16 changes: 0 additions & 16 deletions .github/workflows/ci-bookstore.yml

This file was deleted.

40 changes: 0 additions & 40 deletions apps/bookstore-api/.github/workflows/optic.yml

This file was deleted.

1 change: 1 addition & 0 deletions apps/bookstore-api/.github/workflows/optic.yml
27 changes: 0 additions & 27 deletions ci/github-actions-bookstore/.github/workflows/optic.yml

This file was deleted.

1 change: 1 addition & 0 deletions ci/github-actions-bookstore/.github/workflows/optic.yml

0 comments on commit a114ac6

Please sign in to comment.