Skip to content

Commit

Permalink
Add names to github actions
Browse files Browse the repository at this point in the history
Remove unnecessary matrix parameters
  • Loading branch information
smartspot2 committed Jun 4, 2023
1 parent c2911d5 commit 107332c
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 65 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
name: Cypress E2E

on:
push:
branches: [master]
branches: [ master ]
pull_request:
branches: [master]
branches: [ master ]

env:
PYTHON_VERSION: 3.9

jobs:
cypress-run-chrome:
name: Chrome tests (${{ matrix.containers }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
containers: [1, 2, 3, 4]
containers: [ 1, 2, 3, 4 ]
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: csm_web_dev
ports: ["5432:5432"]
ports: [ "5432:5432" ]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -60,28 +65,29 @@ jobs:
# better cypress run titles
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}

cypress-run-firefox:
name: Firefox tests (${{ matrix.containers }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
containers: [1, 2, 3, 4]
containers: [ 1, 2, 3, 4 ]
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: csm_web_dev
ports: ["5432:5432"]
ports: [ "5432:5432" ]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
Expand Down
44 changes: 21 additions & 23 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,37 @@ on:
pull_request:
branches: [ master ]

env:
PYTHON_VERSION: 3.9

jobs:
pytest:

name: "pytest"
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]

services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: csm_web_dev
ports: ['5432:5432']
ports: [ "5432:5432" ]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DJANGO_ENV: dev
POSTGRES_PASSWORD: postgres
run: |
pytest csm_web
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DJANGO_ENV: dev
POSTGRES_PASSWORD: postgres
run: |
pytest csm_web
59 changes: 29 additions & 30 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,39 @@ on:
pull_request:
branches: [ master ]

env:
NODE_VERSION: 16.x

jobs:
build:
name: npm build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- name: Run linters
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_dir: csm_web/frontend/src
eslint_extensions: js,jsx,ts,tsx
prettier: true
prettier_dir: csm_web/frontend/src
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run build --if-present
- name: Run linters
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_dir: csm_web/frontend/src
eslint_extensions: js,jsx,ts,tsx
prettier: true
prettier_dir: csm_web/frontend/src
test:
name: npm test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run test
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run build --if-present
- run: npm run test

0 comments on commit 107332c

Please sign in to comment.