Skip to content

Commit

Permalink
Deploy to test (#1726)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Sep 20, 2023
2 parents a17dd0b + ec7981c commit b5d0b20
Show file tree
Hide file tree
Showing 30 changed files with 164 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.11
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Write commit SHA to file
run: echo "${{ github.sha }}" >> benefits/static/sha.txt

- name: Docker Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Build, tag, and push image to GitHub Container Registry
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: GIT-SHA=${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: github.event.workflow_run == null || github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download coverage report
uses: dawidd6/action-download-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Start app
run: |
touch .env
docker compose up --detach client server
- name: Run Cypress tests
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v6
env:
CYPRESS_baseUrl: http://localhost:8000
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install system packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Start app
run: |
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ default_stages:

repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.3.0
rev: v2.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand All @@ -34,7 +34,7 @@ repos:
args: ["--maxkb=1500"]

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black
types:
Expand All @@ -55,7 +55,7 @@ repos:
files: .py$

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.1
rev: v3.0.3
hooks:
- id: prettier
types_or: [javascript, css]
Expand Down
9 changes: 8 additions & 1 deletion benefits/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
__version__ = "2023.04.2"
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("benefits")
except PackageNotFoundError:
# package is not installed
pass


VERSION = __version__
6 changes: 4 additions & 2 deletions benefits/core/migrations/0002_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def load_data(app, *args, **kwargs):
AuthProvider = app.get_model("core", "AuthProvider")

senior_auth_provider = AuthProvider.objects.create(
sign_out_button_template="core/includes/button--sign-out--senior.html",
sign_out_link_template="core/includes/link--sign-out--senior.html",
sign_out_button_template="core/includes/button--sign-out--login-gov.html",
sign_out_link_template="core/includes/link--sign-out--login-gov.html",
client_name=os.environ.get("SENIOR_AUTH_PROVIDER_CLIENT_NAME", "senior-benefits-oauth-client-name"),
client_id=os.environ.get("AUTH_PROVIDER_CLIENT_ID", "benefits-oauth-client-id"),
authority=os.environ.get("AUTH_PROVIDER_AUTHORITY", "https://example.com"),
Expand All @@ -155,6 +155,8 @@ def load_data(app, *args, **kwargs):
)

veteran_auth_provider = AuthProvider.objects.create(
sign_out_button_template="core/includes/button--sign-out--login-gov.html",
sign_out_link_template="core/includes/link--sign-out--login-gov.html",
client_name=os.environ.get("VETERAN_AUTH_PROVIDER_CLIENT_NAME", "veteran-benefits-oauth-client-name"),
client_id=os.environ.get("AUTH_PROVIDER_CLIENT_ID", "benefits-oauth-client-id"),
authority=os.environ.get("AUTH_PROVIDER_AUTHORITY", "https://example.com"),
Expand Down
6 changes: 1 addition & 5 deletions benefits/core/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@
{% endblock inner-content %}
</div>
{% block call-to-action %}
<div class="row d-flex flex-column-reverse justify-content-lg-end flex-lg-row">
<div class="col-lg-9 d-flex align-items-end flex-row-reverse col-sm-8 offset-sm-2 offset-lg-0 offset-2 col-8">
{% block call-to-action-text %}
{% endblock call-to-action-text %}
</div>
<div class="row d-flex justify-content-lg-end">
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8">
{% block call-to-action-button %}
{% endblock call-to-action-button %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% if authentication.logged_in %}
{% url "oauth:logout" as sign_out_url %}
<a id="login" href="{{ sign_out_url }}" class="p-0 btn btn-lg" role="button">
<a href="{{ sign_out_url }}" class="login p-0 btn btn-lg" role="button">
<span class="fallback-text color-logo">Login.gov</span>
</a>
{% endif %}
7 changes: 1 addition & 6 deletions benefits/core/templates/core/includes/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@
</div>

{% if form.submit_value %}
<div class="row d-flex flex-column-reverse justify-content-lg-end flex-lg-row pt-8">
{% if help_text %}
<div class="col-lg-9 d-flex align-items-end flex-row-reverse col-sm-8 offset-sm-2 offset-lg-0 offset-2 col-8">
<p class="pt-4 pt-lg-0">{{ help_text }}</p>
</div>
{% endif %}
<div class="row d-flex justify-content-lg-end pt-8">
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8">
<button class="btn btn-lg btn-primary spinner-hidden d-flex justify-content-center align-items-center"
data-action="submit"
Expand Down
2 changes: 1 addition & 1 deletion benefits/core/templates/core/includes/modal-trigger.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Inline link to trigger modal -->
{# djlint:off #}
<a href="#{{ modal }}" class="{{ classes }}" id="{{ id }}" data-bs-toggle="modal" data-bs-target="#{{ modal }}">{{ text }}{% if login %}<span class="fallback-text color-logo">Login.gov</span>{% endif %}</a>{% if period %}.{% endif %}
<a href="#{{ modal }}" class="{{ classes }}" data-bs-toggle="modal" data-bs-target="#{{ modal }}">{{ text }}{% if login %}<span class="fallback-text color-logo">Login.gov</span>{% endif %}</a>{% if period %}.{% endif %}
{# djlint:on #}
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
{% load i18n %}

{% block heading %}
{% translate "A Login.gov account with identity verification" %}
{% translate "A Login.gov account with identity verification" %}
{% endblock heading %}

{% block body %}
<div class="media-body--details">
<p>
{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %}
{% translate "Learn more about identity verification" as text %}
{% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=text period=True %}
</p>
<div class="media-body--items">
<p>{% translate "For this process you will need:" %}</p>
<ul>
<li>{% translate "Your state-issued ID card" %}</li>
<li>{% translate "Your Social Security number" %}</li>
<li>{% translate "A phone number with a phone plan associated with your name" %}</li>
</ul>
</div>
<div class="media-body--details">
<p>
{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %}
{% translate "Learn more about identity verification" as text %}
{% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=text period=True %}
</p>
<div class="media-body--items">
<p>{% translate "For this process you will need:" %}</p>
<ul>
<li>{% translate "Your state-issued ID card" %}</li>
<li>{% translate "Your Social Security number" %}</li>
<li>{% translate "A phone number with a phone plan associated with your name" %}</li>
</ul>
</div>
</div>

{% include "eligibility/includes/modal--senior-start-help.html" with size="modal-lg" id="modal--identity-verification" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% include "eligibility/includes/modal--login-gov-start-help.html" with size="modal-lg" id="modal--identity-verification" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% endblock body %}
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,25 @@
{% load i18n %}

{% block heading %}
{% translate "Access to your preferred VA related account" %}
{% translate "A Login.gov account with identity verification" %}
{% endblock heading %}

{% block body %}
<div class="media-body--details">
<p>
{% translate "You will need to sign into VA.gov in order to verify your identity and your veteran status. VA.gov uses the following services:" %}
{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %}
{% translate "Learn more about identity verification" as text %}
{% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=text period=True %}
</p>
<div class="media-body--items">
<p>{% translate "For this process you will need:" %}</p>
<ul>
<li>{% translate "Login.gov" %}</li>
<li>{% translate "ID.me" %}</li>
<li>{% translate "DS Logon" %}</li>
<li>{% translate "My HealtheVet" %}</li>
<li>{% translate "Your state-issued ID card" %}</li>
<li>{% translate "Your Social Security number" %}</li>
<li>{% translate "A phone number with a phone plan associated with your name" %}</li>
</ul>
<p class="pt-1">
{% translate "If you do not have an account with any of these services, you will need to create one. We recommend using Login.gov." %}
</p>
</div>
</div>

{% include "eligibility/includes/modal--login-gov-start-help.html" with size="modal-lg" id="modal--identity-verification" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% endblock body %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{% load i18n %}

{% block label %}
{% translate "Older Adult" %}
{% translate "Older Adult" %}
{% endblock label %}

{% block description %}
{% translate "You must be 65 years or older. You will need to verify your identity with" %}
{% translate "You must be 65 years or older. You will need to verify your identity with" %}

{% include "core/includes/modal-trigger.html" with classes="border-0 bg-transparent p-0" id="login" modal="modal--login-gov" login=True period=True %}
{% include "core/includes/modal-trigger.html" with classes="border-0 bg-transparent p-0 login" modal="modal--login-gov" login=True period=True %}

{% include "eligibility/includes/modal--senior-help.html" with id="modal--login-gov" size="modal-lg" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% include "eligibility/includes/modal--login-gov-help.html" with id="modal--login-gov" size="modal-lg" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% endblock description %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@

{% block description %}
{% blocktranslate trimmed %}
This option is for people who have served in the active military, naval, or air service, and who were discharged or
released therefrom under conditions other than dishonorable. You will need to
<a href="https://www.va.gov/resources/verifying-your-identity-on-vagov/" target="_blank" rel="noopener noreferrer">verify your identity through VA.gov</a>.
This option is for people who have served in the active military, naval, or air service, and who were discharged or released therefrom under conditions other than dishonorable. You will need to verify your identity with
{% endblocktranslate %}

{% include "core/includes/modal-trigger.html" with classes="border-0 bg-transparent p-0 login" modal="modal--login-gov-veteran" login=True period=True %}

{% include "eligibility/includes/modal--login-gov-help.html" with id="modal--login-gov-veteran" size="modal-lg" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}

{% endblock description %}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>{% translate "You selected an Older Adult transit benefit." %}</h1>
<div class="col-lg-4 offset-2 offset-lg-0 col-sm-8 col-8 d-flex justify-content-lg-end justify-content-center">
{% url "oauth:login" as button_url %}
{% translate "Get started with" as button_text %}
<a href="{{ button_url }}" class="btn btn-lg btn-primary" id="login">
<a href="{{ button_url }}" class="btn btn-lg btn-primary login">
{{ button_text }} <span class="fallback-text white-logo">Login.gov</span>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ <h1>{% translate "You selected a Veteran transit benefit." %}</h1>

{% block call-to-action %}
<div class="row d-flex justify-content-lg-end">
<div class="col-lg-3 offset-2 offset-sm-2 offset-lg-0 col-sm-8 col-8">
<div class="col-lg-4 offset-2 offset-lg-0 col-sm-8 col-8 d-flex justify-content-lg-end justify-content-center">
{% url "oauth:login" as button_url %}
{% translate "Continue to VA.gov" as button_text %}
<a href="{{ button_url }}" class="btn btn-lg btn-primary" role="button">{{ button_text }}</a>
{% translate "Get started with" as button_text %}
<a href="{{ button_url }}" class="btn btn-lg btn-primary login">
{{ button_text }} <span class="fallback-text white-logo">Login.gov</span>
</a>
</div>
</div>
{% endblock call-to-action %}
Loading

0 comments on commit b5d0b20

Please sign in to comment.