Skip to content

NEW: Make use of generic workflows #376

NEW: Make use of generic workflows

NEW: Make use of generic workflows #376

Workflow file for this run

name: Pipeline
on:
- pull_request
concurrency:
group: pull-request-${{ github.ref }}
cancel-in-progress: true
jobs:
# DOCKER
build:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Test
image: "gmmcal/gmmcal:test"
cypress:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Cypress
target: cypress
image: "gmmcal/gmmcal:cypress"
preview:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Preview
target: production
image: "gmmcal/gmmcal:preview-${{ github.event.number }}-${{ github.run_number }}"
publish: true
development:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Development
target: development
publish: false
image: gmmcal/gmmcal:development
production:
name: Build Image
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_docker.yml@v0
secrets: inherit
with:
name: Production
target: production
publish: false
image: gmmcal/gmmcal:production
# LINT
rubocop:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Rubocop
image: gmmcal/gmmcal:test
command: bundle exec rubocop --config .rubocop.yml .
needs: build
reek:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Reek
image: gmmcal/gmmcal:test
command: bundle exec reek --config .reek.yml .
needs: build
brakeman:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Brakeman
image: gmmcal/gmmcal:test
command: bundle exec brakeman
needs: build
scsslint:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: SCSSLint
image: gmmcal/gmmcal:test
command: bundle exec scss-lint --config .scss-lint.yml
needs: build
bundler-audit:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: Bundler Audit
image: gmmcal/gmmcal:test
command: bundle exec bundle-audit check --update
needs: build
eslint:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: ESLint
image: gmmcal/gmmcal:cypress
command: yarn eslint
needs: cypress
eslint_tests:
name: Lint
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_lint.yml@v0
with:
name: ESLint - Tests
image: gmmcal/gmmcal:cypress
command: yarn eslint:tests
needs: cypress
# TESTS
tests:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_tests.yml@v0
with:
image: gmmcal/gmmcal:test
command: bundle exec rspec
needs: build
e2e-admin:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_cypress.yml@v0
with:
image: gmmcal/gmmcal:cypress
application-image: gmmcal/gmmcal:test
pattern: spec/end-to-end/tests/admin/**.js
name: Admin
needs: [build, cypress]
e2e-frontend:
name: Tests
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_cypress.yml@v0
with:
image: gmmcal/gmmcal:cypress
application-image: gmmcal/gmmcal:test
pattern: spec/end-to-end/tests/frontend/**.js
name: Frontend
needs: [build, cypress]
# Preview and Cleanup
deploy:
name: Preview
uses: gmmcal/gmmcal-reusable-workflows/.github/workflows/_preview.yml@v0
needs: preview
secrets: inherit
with:
image: "gmmcal/gmmcal:preview-${{ github.event.number }}-${{ github.run_number }}"