-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ghstack-poisoned]
- Loading branch information
0 parents
commit 279f945
Showing
136 changed files
with
12,028 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: CI Checks | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths-ignore: | ||
- '*.md' | ||
- '*.png' | ||
- '*.svg' | ||
- '*.toml' | ||
- '.gitignore' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
paths-ignore: | ||
- '*.md' | ||
- '*.png' | ||
- '*.svg' | ||
- '*.toml' | ||
- '.gitignore' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
|
||
- name: Install required packages (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y locales | ||
sudo locale-gen zh_TW ja_JP ko_KR en_US | ||
sudo update-locale LANG=en_US | ||
echo "LC_ALL=en_US" >> $GITHUB_ENV | ||
echo "LANG=en_US" >> $GITHUB_ENV | ||
echo "LANGUAGE=en_US" >> $GITHUB_ENV | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
.github | ||
src | ||
pyproject.toml | ||
requirements.txt | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Unit tests with pytest | ||
run: | | ||
pytest -m 'unit' | ||
- name: Tests with marker 'ubuntu' | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
pytest -m 'ubuntu' | ||
- name: Tests with marker 'macos' | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
pytest -m 'macos' | ||
- name: Tests with marker 'windows' | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
pytest -m 'windows' | ||
- name: Upload image diffs when tests failed | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: diffs-of-generated-roadmaps-${{ matrix.os }}-${{ matrix.python-version }} | ||
path: | | ||
src/tests/diffs_of_generated_roadmaps/ | ||
src/tests/generated_roadmaps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Generate example roadmaps | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
.github | ||
src | ||
pyproject.toml | ||
requirements.txt | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Generate roadmaps (non-Windows) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
# Get only part before `-` of matrix.os | ||
os=$(echo "${{ matrix.os }}" | cut -d- -f1) | ||
# Capitalise first letter of os | ||
os="$(tr '[:lower:]' '[:upper:]' <<< ${os:0:1})${os:1}" | ||
mkdir "examples" | ||
python -m src.tests.roadmap_generators.roadmap_generator --operating-system $os --target-directory examples | ||
- name: Generate roadmaps (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
# Get only part before `-` of matrix.os | ||
$os = "${{ matrix.os }}" -split "-" | Select-Object -First 1 | ||
# Capitalise first letter of os | ||
$os = $os.Substring(0, 1).ToUpper() + $os.Substring(1) | ||
mkdir examples | ||
python -m src.tests.roadmap_generators.roadmap_generator --operating-system $os --target-directory examples | ||
- name: Upload generated roadmaps | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: example-roadmaps-${{ matrix.os }} | ||
path: examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Lint with Ruff | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths-ignore: | ||
- '*.md' | ||
- '*.png' | ||
- '*.svg' | ||
- '.gitignore' | ||
- 'images/**' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
paths-ignore: | ||
- '*.md' | ||
- '*.png' | ||
- '*.svg' | ||
- '.gitignore' | ||
- 'images/**' | ||
|
||
jobs: | ||
ruff: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
.github | ||
src | ||
pyproject.toml | ||
requirements.txt | ||
- name: Lint with `ruff check .` | ||
uses: chartboost/ruff-action@v1 |
Oops, something went wrong.