Skip to content

AV-2060: Rename Avoindata.fi to Suomi.fi Open Data #1969

AV-2060: Rename Avoindata.fi to Suomi.fi Open Data

AV-2060: Rename Avoindata.fi to Suomi.fi Open Data #1969

Workflow file for this run

name: Code Quality Checks
on:
push:
branches:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
ruff:
name: ruff
runs-on: ubuntu-latest
container: python:3.11
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install requirements
run: |
pip install ruff
- name: Run ruff
run: |
ruff check --format=github ckan
code-sniffer:
name: code-sniffer
runs-on: ubuntu-latest
container: php:8.1
steps:
- uses: actions/checkout@v3
- name: Install Composer
run: |
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]
then
>&2 echo 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet --version=2.1.14
RESULT=$?
rm composer-setup.php
mv composer.phar /usr/local/bin/composer
exit $RESULT
shell: sh
- name: Set up environment
run : |
apt-get update && apt-get install -y zlib1g-dev libsqlite3-dev libpng-dev libzip-dev unzip git
docker-php-ext-install gd
- run: php -d memory_limit=-1 /usr/local/bin/composer install -n --prefer-dist
working-directory: ./drupal/
- name: Ignore warnings on exit code
run: ./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
working-directory: ./drupal/
- name: Run codesniffer for drupal standard
run: ./vendor/bin/phpcs --standard=Drupal modules --ignore=*\.js
working-directory: ./drupal
- name: Run codesniffer for drupal practice
run: ./vendor/bin/phpcs --standard=DrupalPractice modules --ignore=*\.js
working-directory: ./drupal
stylelint:
name: stylelint
runs-on: ubuntu-latest
container: node:14
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
cat <<EOT >> .npmrc
@fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken=$NPM_TOKEN
EOT
npm ci
working-directory: ./opendata-assets
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: run stylelint
run: $(npm bin)/stylelint "src/less"
working-directory: ./opendata-assets
slack:
name: Slack notification
runs-on: ubuntu-latest
needs:
- ruff
- code-sniffer
- stylelint
if: failure() && github.ref == 'refs/heads/master'
steps:
- uses: 8398a7/action-slack@v3
with:
status: 'failure'
fields: repo,message,author,action,ref
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEB_HOOK }}