From 4be44a370e9fab55ed7686b5fbdf6a05a00cdbfc Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 28 Oct 2023 20:01:40 +0200 Subject: [PATCH 1/3] Improve consistency in the GitHub Actions workflow for the Fluent linter This commit tweaks the Fluent linter workflow to match the other workflow files we have, so we make sure the steps have a newline between them for better readability and align names and descriptions of steps with how they are called in the other workflow files we have. --- .github/workflows/fluent_linter.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/fluent_linter.yml b/.github/workflows/fluent_linter.yml index ef823a6da4a20..0be98bf8773e0 100644 --- a/.github/workflows/fluent_linter.yml +++ b/.github/workflows/fluent_linter.yml @@ -19,19 +19,24 @@ permissions: contents: read jobs: - linter: + lint: + name: Lint runs-on: ubuntu-latest + steps: - - name: Clone repository + - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Python 3 + + - name: Use Python 3.10 uses: actions/setup-python@v4 with: python-version: '3.10' cache: 'pip' - - name: Install Python dependencies + + - name: Install Fluent dependencies run: | pip install -r .github/requirements.txt - - name: Lint reference + + - name: Lint Fluent reference files run: | moz-fluent-lint ./l10n/en-US --config .github/linter_config.yml From 9d6cdf216d501c410bfc89fc42b40b9f9ecae3b6 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 28 Oct 2023 20:02:08 +0200 Subject: [PATCH 2/3] Use Python 3.12 in the GitHub Actions workflow for the Fluent linter The current stable version of Python is Python 3.12, see https://www.python.org/downloads, so we should switch to that since Python 3.10 is older and only receives security updates. --- .github/workflows/fluent_linter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fluent_linter.yml b/.github/workflows/fluent_linter.yml index 0be98bf8773e0..df9d9c651e49b 100644 --- a/.github/workflows/fluent_linter.yml +++ b/.github/workflows/fluent_linter.yml @@ -27,10 +27,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Use Python 3.10 + - name: Use Python 3.12 uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' cache: 'pip' - name: Install Fluent dependencies From 4845d35c50d1e75ba5c521d7b07eee40c29dc77e Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sat, 28 Oct 2023 20:15:25 +0200 Subject: [PATCH 3/3] Fix the configuration path in the GitHub Actions workflow for the Fluent linter I noticed the following warning in the GitHub Actions workflow logs: `Configuration file not found: .github/linter_config.yml` The configuration file is called `fluent_linter_config.yml` instead, so this commit fixes the path so it points to the correct file. Fixes 487816b. --- .github/workflows/fluent_linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fluent_linter.yml b/.github/workflows/fluent_linter.yml index df9d9c651e49b..1baa37a03d4ad 100644 --- a/.github/workflows/fluent_linter.yml +++ b/.github/workflows/fluent_linter.yml @@ -39,4 +39,4 @@ jobs: - name: Lint Fluent reference files run: | - moz-fluent-lint ./l10n/en-US --config .github/linter_config.yml + moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml