diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04a71924..0c1fbd13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,9 @@ jobs: run: working-directory: ./backend steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies @@ -45,10 +45,10 @@ jobs: run: working-directory: ./frontend steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: "16" + node-version: '18' - name: Install Yarn run: npm install -g yarn - name: Install npm modules @@ -65,6 +65,6 @@ jobs: run: working-directory: ./docker steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: hadolint run: hadolint ./Dockerfile* diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d629a42a..deeed483 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,7 +3,7 @@ # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. -name: "CodeQL" +name: 'CodeQL' on: push: @@ -29,43 +29,43 @@ jobs: # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 + - name: Checkout repository + uses: actions/checkout@v4 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/mkdocs-deployment.yml b/.github/workflows/mkdocs-deployment.yml index 38fe8234..da8bce71 100644 --- a/.github/workflows/mkdocs-deployment.yml +++ b/.github/workflows/mkdocs-deployment.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Deploy docs uses: mhausenblas/mkdocs-deploy-gh-pages@1.16 env: diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index b1160bd9..3563c85c 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Docker meta id: docker_meta @@ -56,7 +56,7 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: doccano/doccano:backend labels: ${{ steps.docker_meta.outputs.labels }} - + - name: Build a frontend image and push uses: docker/build-push-action@v3 with: diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 328eb9f0..8b26ab0a 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -9,16 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Preparation run: | mkdir backend/client - name: Fix up git URLs run: echo -e '[url "https://github.com/"]\n insteadOf = "git@github.com:"' >> ~/.gitconfig - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' - name: Build with Node.js run: | yarn install @@ -28,7 +28,7 @@ jobs: env: PUBLIC_PATH: '/static/_nuxt/' - name: Setup Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 - name: Install dependencies diff --git a/.github/workflows/test-installation.yml b/.github/workflows/test-installation.yml index ee3704e9..48ee51f8 100644 --- a/.github/workflows/test-installation.yml +++ b/.github/workflows/test-installation.yml @@ -2,7 +2,7 @@ name: Test installation and doccano commands on: schedule: - - cron: "15 22 * * *" + - cron: '15 22 * * *' jobs: test: @@ -10,23 +10,23 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10"] + python-version: ['3.8', '3.9', '3.10'] steps: - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Enabling JSON1 extension on SQLite - if: ${{ startsWith(matrix.os, 'windows') && matrix.python-version == '3.8' }} - shell: bash - run: | - export VERSION=`python -V | cut -f2 -d " "` - curl -LO https://www.sqlite.org/2022/sqlite-dll-win64-x64-3390300.zip - unzip sqlite-dll-win64-x64-3390300.zip - mv sqlite3.dll /c/hostedtoolcache/windows/Python/$VERSION/x64/DLLs/ - - name: Test installation - run: pip install doccano - - name: Test doccano init command - run: doccano init - - name: Test doccano createuser command - run: doccano createuser --username admin --password pass + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Enabling JSON1 extension on SQLite + if: ${{ startsWith(matrix.os, 'windows') && matrix.python-version == '3.8' }} + shell: bash + run: | + export VERSION=`python -V | cut -f2 -d " "` + curl -LO https://www.sqlite.org/2022/sqlite-dll-win64-x64-3390300.zip + unzip sqlite-dll-win64-x64-3390300.zip + mv sqlite3.dll /c/hostedtoolcache/windows/Python/$VERSION/x64/DLLs/ + - name: Test installation + run: pip install doccano + - name: Test doccano init command + run: doccano init + - name: Test doccano createuser command + run: doccano createuser --username admin --password pass diff --git a/backend/config/settings/gcp.py b/backend/config/settings/gcp.py index ab01ed64..34dc7626 100644 --- a/backend/config/settings/gcp.py +++ b/backend/config/settings/gcp.py @@ -13,6 +13,4 @@ GS_PROJECT_ID = env("GS_PROJECT_ID") # https://django-storages.readthedocs.io/en/latest/backends/gcloud.html#authentication-settings _google_application_credentials = env("GOOGLE_APPLICATION_CREDENTIALS", "") if _google_application_credentials: - GS_CREDENTIALS = service_account.Credentials.from_service_account_file( - _google_application_credentials - ) + GS_CREDENTIALS = service_account.Credentials.from_service_account_file(_google_application_credentials)