Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/yaml checker #122

Merged
merged 17 commits into from
Oct 24, 2023
50 changes: 18 additions & 32 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,52 +29,38 @@ concurrency:
cancel-in-progress: false

jobs:
# Test the yaml
check_yaml:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install PyTest Dependencies
run: |
cd CI
python -m pip install poetry==1.1.14
poetry install
- name: Run Pytest tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd CI
poetry run python -m unittest
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Detect package manager
# id: detect-package-manager
# run: |
# if [ -f "${{ github.workspace }}/yarn.lock" ]; then
# echo "manager=yarn" >> $GITHUB_OUTPUT
# echo "command=install" >> $GITHUB_OUTPUT
# echo "runner=yarn" >> $GITHUB_OUTPUT
# exit 0
# elif [ -f "${{ github.workspace }}/package.json" ]; then
# echo "manager=npm" >> $GITHUB_OUTPUT
# echo "command=ci" >> $GITHUB_OUTPUT
# echo "runner=npx --no-install" >> $GITHUB_OUTPUT
# exit 0
# else
# echo "Unable to determine packager manager"
# exit 1
# fi
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
# - name: Restore cache
# uses: actions/cache@v3
# with:
# path: |
# .next/cache
# # Generate a new cache whenever packages or source files change.
# key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# # If source files changed but packages didn't, rebuild from a prior cache.
# restore-keys: |
# ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: npm install
- name: Build with Next.js
Expand Down
Binary file added CI/__pycache__/test_yaml.cpython-39.pyc
Binary file not shown.
Binary file added CI/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading