Skip to content

Commit

Permalink
Use shared configurations for ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sinaeftekhar committed Aug 9, 2023
1 parent a1877b4 commit 15217d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 49 deletions.
45 changes: 7 additions & 38 deletions .github/workflows/ci_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,12 @@ concurrency:
cancel-in-progress: true

jobs:
build_app:
name: Build test application
uses: mainio/gha-decidim-module/.github/workflows/build_app.yml@main
secrets: inherit
main:
needs: build_app
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:11
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: postgres
env:
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rake test_app
name: Create test app
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots
name: Create the screenshots folder
- uses: nanasess/setup-chromedriver@v2
- run: bundle exec rspec
name: RSpec
- uses: codecov/codecov-action@v3
- uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: ./spec/decidim_dummy_app/tmp/screenshots
if-no-files-found: ignore
uses: mainio/gha-decidim-module/.github/workflows/ci_rspec.yml@main
secrets: inherit
13 changes: 2 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,5 @@ concurrency:
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Rubocop
run: bundle exec rubocop -P
uses: mainio/gha-decidim-module/.github/workflows/lint.yml@main
secrets: inherit

0 comments on commit 15217d3

Please sign in to comment.