Skip to content

Commit

Permalink
Merge pull request #146 from open-contracting/dependabot/github_actio…
Browse files Browse the repository at this point in the history
…ns/tj-actions/changed-files-42

build(deps): bump tj-actions/changed-files from 41 to 42
  • Loading branch information
yolile authored Jan 19, 2024
2 parents 020b9db + ec8f8bf commit 731ee77
Show file tree
Hide file tree
Showing 28 changed files with 27,510 additions and 27,419 deletions.
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
128 changes: 64 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
name: CI
on: [push, pull_request]
jobs:
build_backend:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- run: pip install -r requirements.txt
# Check requirements.txt contains production requirements.
- working-directory: backend
run: ./manage.py --help
- run: pip install -r requirements_dev.txt
- name: Run Pelican backend migrations
run: |
curl -sS \
https://raw.githubusercontent.com/open-contracting/pelican-backend/main/pelican/migrations/001_base.sql \
https://raw.githubusercontent.com/open-contracting/pelican-backend/main/pelican/migrations/002_constraints.sql \
| psql postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres -f -
- name: Run checks and tests
env:
PYTHONWARNINGS: error
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
PELICAN_BACKEND_DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
shell: bash
working-directory: backend
run: |
./manage.py migrate
./manage.py makemigrations --check --dry-run
./manage.py check --fail-level WARNING
coverage run --source api,core,exporter manage.py test
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: backend
run: coveralls --service=github
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp
build_backend:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- run: pip install -r requirements.txt
# Check requirements.txt contains production requirements.
- working-directory: backend
run: ./manage.py --help
- run: pip install -r requirements_dev.txt
- name: Run Pelican backend migrations
run: |
curl -sS \
https://raw.githubusercontent.com/open-contracting/pelican-backend/main/pelican/migrations/001_base.sql \
https://raw.githubusercontent.com/open-contracting/pelican-backend/main/pelican/migrations/002_constraints.sql \
| psql postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres -f -
- name: Run checks and tests
env:
PYTHONWARNINGS: error
DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
PELICAN_BACKEND_DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres
shell: bash
working-directory: backend
run: |
./manage.py migrate
./manage.py makemigrations --check --dry-run
./manage.py check --fail-level WARNING
coverage run --source api,core,exporter manage.py test
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: backend
run: coveralls --service=github
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432/tcp

build_frontend:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: "**/package-lock.json"
- run: npm ci
- run: npx vue-cli-service build
build_frontend:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: "**/package-lock.json"
- run: npm ci
- run: npx vue-cli-service build
70 changes: 35 additions & 35 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Deploy
on:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
docker:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://github.com/docker/login-action#github-container-registry
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action#usage
- uses: docker/setup-buildx-action@v3
# https://github.com/docker/build-push-action#usage
- uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile_django
tags: |
ghcr.io/${{ github.repository }}-django:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile_static
tags: |
ghcr.io/${{ github.repository }}-static:latest
cache-from: type=gha
cache-to: type=gha,mode=max
docker:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# https://github.com/docker/login-action#github-container-registry
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action#usage
- uses: docker/setup-buildx-action@v3
# https://github.com/docker/build-push-action#usage
- uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile_django
tags: |
ghcr.io/${{ github.repository }}-django:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile_static
tags: |
ghcr.io/${{ github.repository }}-static:latest
cache-from: type=gha
cache-to: type=gha,mode=max
50 changes: 25 additions & 25 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Translations
on:
pull_request: {}
push:
branches: [main]
pull_request: {}
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- name: Install translate-toolkit
run: |
sudo apt update
sudo apt install gettext translate-toolkit
- run: pip install -r requirements.txt
- working-directory: backend
run: python manage.py makemessages -a
- name: Count incomplete translations
shell: bash
run: |
output=$(find . -name LC_MESSAGES -not -path "*/en_US/*" -exec pocount --incomplete --short "{}" +)
echo $output
[ "$output" = "" ]
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- name: Install translate-toolkit
run: |
sudo apt update
sudo apt install gettext translate-toolkit
- run: pip install -r requirements.txt
- working-directory: backend
run: python manage.py makemessages -a
- name: Count incomplete translations
shell: bash
run: |
output=$(find . -name LC_MESSAGES -not -path "*/en_US/*" -exec pocount --incomplete --short "{}" +)
echo $output
[ "$output" = "" ]
70 changes: 35 additions & 35 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: Lint
on: [push, pull_request]
env:
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
jobs:
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- id: changed-files
uses: tj-actions/changed-files@v41
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[github-actions] pre-commit autoupdate"
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: pip install -r requirements_dev.txt
- env:
# https://www.django-rest-framework.org/api-guide/schemas/#generating-an-openapi-schema
STANDARD_MAINTENANCE_SCRIPTS_IGNORE: uritemplate,pyyaml
working-directory: backend
run: pytest /tmp/test_requirements.py
build:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
env:
PAT: ${{ secrets.PAT }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || github.token }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: "**/requirements*.txt"
- id: changed-files
uses: tj-actions/changed-files@v42
- uses: pre-commit/[email protected]
continue-on-error: true
with:
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
- if: ${{ env.PAT }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[github-actions] pre-commit autoupdate"
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
- shell: bash
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
- run: pip install -r requirements_dev.txt
- env:
# https://www.django-rest-framework.org/api-guide/schemas/#generating-an-openapi-schema
STANDARD_MAINTENANCE_SCRIPTS_IGNORE: uritemplate,pyyaml
working-directory: backend
run: pytest /tmp/test_requirements.py
Loading

0 comments on commit 731ee77

Please sign in to comment.