Skip to content

Update _language_chooser.html.erb #365

Update _language_chooser.html.erb

Update _language_chooser.html.erb #365

Workflow file for this run

name: "CI/CD"
on: [ push ]
env:
CI: "true"
SIMPLECOV: "true"
RUBY_VERSION: 2.7.7
RAILS_ENV: test
NODE_VERSION: 16.9.1
RUBYOPT: '-W:no-deprecated'
RSPEC_FORMATTER: 'documentation'
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.3.0
if: "github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: OpenSourcePolitics/lint-action@master
tests:
name: Tests
runs-on: ubuntu-latest
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
RAILS_ENV: test
# Set locales available for i18n tasks
ENFORCED_LOCALES: "en"
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.2.2
if: "github.ref != 'refs/heads/master' || github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: OpenSourcePolitics/rspec-action@master
with:
command: 'bundle exec rspec --exclude-pattern "spec/system/**/*_spec.rb"'
prepare_command: "bundle exec rails db:create db:migrate"
system_tests:
name: System tests
runs-on: ubuntu-latest
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
RAILS_ENV: test
# Set locales available for i18n tasks
ENFORCED_LOCALES: "en"
TRANSLATION_MODE: "smartling"
steps:
- uses: rokroskar/workflow-run-cleanup-action@v0.2.2
if: "github.ref != 'refs/heads/master' || github.ref != 'refs/heads/develop'"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: OpenSourcePolitics/rspec-action@master
with:
command: 'bundle exec rspec "spec/system"'
prepare_command: "bundle exec rails db:create db:migrate"
push_to_code_commit:
needs: [ tests, lint, system_tests ]
name: Push to CodeCommit
runs-on: ubuntu-latest
if: "github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to CodeCommit
run: |
git push "https://${{ secrets.NYC_AWS_ACCESS_KEY_ID }}:${{ secrets.NYC_AWS_SECRET_ACCESS_KEY }}@git-codecommit.${{ vars.NYC_CODE_COMMIT_AWS_REGION }}.amazonaws.com/v1/repos/${{ vars.NYC_CODE_COMMIT_REPO_NAME }}" ${{ github.ref }}