From f2474123028f7220967240e7aba066cb232f946b Mon Sep 17 00:00:00 2001 From: Kieron Taylor Date: Tue, 26 Mar 2024 16:34:28 +0000 Subject: [PATCH 1/3] Silence warnings from JS toolchain --- frontend/Dockerfile | 2 +- frontend/jsconfig.json | 3 +++ frontend/package.json | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 frontend/jsconfig.json diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1e777afc..fbcdb61c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine as base-stage +FROM node:20-alpine as base-stage COPY package.json /code/longue_vue/ diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json new file mode 100644 index 00000000..92d8d97f --- /dev/null +++ b/frontend/jsconfig.json @@ -0,0 +1,3 @@ +{ + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 1e1f1172..5847f854 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,6 +8,7 @@ "node": ">=16.16.0", "npm": ">=8.11.0" }, + "type": "module", "scripts": { "dev": "vite --port 3000", "build": "vite build", From ba1b752cbed33e0b818a19a3210929ec5467b22b Mon Sep 17 00:00:00 2001 From: Kieron Taylor Date: Wed, 3 Apr 2024 16:28:20 +0000 Subject: [PATCH 2/3] Update github test pipeline to use newer node versions in tests and actions --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f52c71c6..9e719153 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,9 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -59,13 +59,13 @@ jobs: MYSQL_DATABASE: "langqc" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Poetry run: | pipx install poetry - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -82,10 +82,10 @@ jobs: test-frontend: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '20' - run: npm install working-directory: ./frontend - run: npm run test From 8535d013964f82a8d37c750c0046a29db356348c Mon Sep 17 00:00:00 2001 From: Kieron Taylor Date: Wed, 3 Apr 2024 16:34:35 +0000 Subject: [PATCH 3/3] Update action versions in other github pipelines --- .github/workflows/deploy-pages.yml | 9 ++++----- .github/workflows/lint.yml | 6 +++--- .github/workflows/publish-docker.yml | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 35578d6c..bee638b2 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -11,13 +11,13 @@ jobs: DB_URL: "mysql+pymysql://q:q@q/q" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Poetry run: | pipx install poetry - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -27,14 +27,13 @@ jobs: run: | poetry env use '3.10' poetry install - + - name: Build openapi.json run: | mkdir gh_pages poetry run python -c "from lang_qc.main import app; import json; output = open('gh-pages/openapi.json', 'w'); json.dump(app.openapi(), output); output.close()" - name: Deploy github pages - uses: JamesIves/github-pages-deploy-action@v4.3.3 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: - branch: gh-pages folder: gh-pages diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a2f86555..9c82b7f3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Poetry run: | pipx install poetry - - uses: actions/setup-python@v3 + - uses: actions/setup-python@v5 with: python-version: '3.10' architecture: 'x64' @@ -41,7 +41,7 @@ jobs: run: | poetry run isort --check --diff --color . - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.x diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 41ba6b5e..3d5376f4 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin