docs: uncomment the datagouv_summary example key in endpoint templates #542
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env: | |
| CI: true | |
| COVERAGE: true | |
| defaults: | |
| run: | |
| working-directory: siade | |
| name: "API: CI - CD" | |
| on: | |
| push: | |
| paths: | |
| - 'siade/**' | |
| - 'commons/**' | |
| jobs: | |
| security: | |
| name: Brakeman | |
| if: "${{ github.actor != 'dependabot[bot]' }}" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| working-directory: siade | |
| - name: Brakeman | |
| uses: reviewdog/action-brakeman@v2 | |
| with: | |
| workdir: siade | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| bundler-cache: true | |
| cache-version: 347 | |
| working-directory: siade | |
| - name: Run RuboCop | |
| run: bundle exec rubocop --parallel | |
| check-swagger: | |
| name: Check Swagger generation | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_USER: siade | |
| POSTGRES_DB: siade_test | |
| POSTGRES_PASSWORD: wow*verysecret | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis | |
| ports: ["6379:6379"] | |
| options: --entrypoint redis-server | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| bundler-cache: true | |
| cache-version: 322 | |
| working-directory: siade | |
| - name: Run install.sh | |
| run: ./bin/install.sh | |
| - name: Check Swagger file is up-to-date | |
| run: ./bin/test_swagger.sh | |
| check-zeitwerk: | |
| name: Check Zeitwerk | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| bundler-cache: true | |
| cache-version: 322 | |
| working-directory: siade | |
| - name: Check Zeitwerk | |
| run: | | |
| bundle exec rails runner 'Zeitwerk::Loader.eager_load_all' | |
| env: | |
| ZEITWERK_CHECK: true | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_USER: siade | |
| POSTGRES_DB: siade_test | |
| POSTGRES_PASSWORD: wow*verysecret | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis | |
| ports: ["6379:6379"] | |
| options: --entrypoint redis-server | |
| steps: | |
| - name: Dump Github context | |
| working-directory: . | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| run: echo "$GITHUB_CONTEXT" | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup ruby | |
| uses: ruby/setup-ruby@v1.321.0 | |
| with: | |
| bundler-cache: true | |
| cache-version: 322 | |
| working-directory: siade | |
| - name: Update repository | |
| run: sudo apt-get update | |
| - name: Install dependencies | |
| run: sudo apt-get install libgpgme11-dev | |
| - name: Run install.sh | |
| run: ./bin/install.sh | |
| - name: set timezone | |
| uses: szenius/set-timezone@v2.0 | |
| with: | |
| timezoneLinux: "Europe/Paris" | |
| - name: Run tests | |
| run: COVERAGE=true bundle exec rspec | |
| - name: SimpleCov check | |
| if: "${{ github.actor != 'dependabot[bot]' }}" | |
| uses: joshmfrankel/simplecov-check-action@main | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| minimum_suite_coverage: 95 | |
| coverage_path: siade/coverage/.last_run.json | |
| deploy: | |
| name: Deploy | |
| if: github.ref == 'refs/heads/develop' | |
| needs: | |
| - security | |
| - lint | |
| - check-swagger | |
| - check-zeitwerk | |
| - tests | |
| uses: ./.github/workflows/_api-deploy.yml | |
| secrets: inherit |