Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CheckHomework

on: [pull_request]

jobs:
check:
if: contains(github.repository,'HackYourFuture')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nelonoel/branch-name@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- run: npm install
- name: Echo week folder and run tests
run: |
echo ${{github.repository}}
echo ${{github.head_ref}}
declare WEEK
WEEK=$(echo "${{github.head_ref}}" | sed -E 's/.*w(eek)?[-_]?([0-9]).*/week\2/gi')
echo Week: "${WEEK}"
npm run test-"${WEEK}"