Skip to content

Commit d84acae

Browse files
authored
Merge branch 'main' into AYK
2 parents ccd4e94 + a49c91e commit d84acae

70 files changed

Lines changed: 673 additions & 258 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/pd-assignment.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/tech-ed-assignment.yml

Lines changed: 0 additions & 88 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Validate PR Metadata and Check SDC-Tools Tasks
2+
on:
3+
pull_request_target:
4+
types:
5+
- labeled
6+
- opened
7+
- edited
8+
- reopened
9+
10+
jobs:
11+
validate_pr_metadata:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: CodeYourFuture/actions/validate-pr-metadata@main
16+
with:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
19+
test_sdc_tasks:
20+
name: Test SDC Tasks
21+
runs-on: ubuntu-slim
22+
permissions:
23+
pull-requests: write
24+
if: ${{ github.event.label.name == 'Needs Review' }}
25+
steps:
26+
- name: checkout base branch
27+
uses: actions/checkout@v7
28+
with:
29+
allow-unsafe-pr-checkout: true
30+
ref: ${{ github.event.pull_request.head.sha }}
31+
- name: Get changed files
32+
id: changed-files
33+
uses: tj-actions/changed-files@v47.0.5
34+
- name: test individual shell tools
35+
id: test-individual-shell-tools
36+
if: contains(steps.changed-files.outputs.modified_files, 'individual-shell-tools/')
37+
run: ./test-sdc.sh individual-shell-tools
38+
shell: bash
39+
- name: test jq
40+
id: test-jq
41+
if: contains(steps.changed-files.outputs.modified_files, 'jq/')
42+
run: ./test-sdc.sh jq
43+
shell: bash
44+
- name: test shell-pipelines
45+
id: test-shell-pipelines
46+
if: contains(steps.changed-files.outputs.modified_files, 'shell-pipelines/')
47+
run: ./test-sdc.sh shell-pipelines
48+
shell: bash
49+
- name: test number-systems
50+
id: test-number-systems
51+
if: contains(steps.changed-files.outputs.modified_files, 'number-systems/')
52+
run: ./test-sdc.sh number-systems
53+
shell: bash
54+
- name: test implement-cowsay
55+
id: test-implement-cowsay
56+
if: contains(steps.changed-files.outputs.all_modified_files, 'implement-cowsay/')
57+
run: ./test-sdc.sh implement-cowsay
58+
shell: bash
59+
- name: make output comment
60+
if: steps.test-individual-shell-tools.outputs.attempted == 'y' || steps.test-jq.outputs.attempted == 'y' || steps.test-shell-pipelines.outputs.attempted == 'y' || steps.test-number-systems.outputs.attempted == 'y' || steps.test-implement-cowsay.outputs.attempted == 'y'
61+
env:
62+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
ISSUE_URL: ${{ github.event.pull_request.html_url }}
64+
run: |
65+
gh release -R CodeYourFuture/trainee-tracker view --json assets -q ".assets[] | select(.name | startswith(\"pr-metadata-validator-musl-\")).url" | xargs curl --fail -L -o /tmp/pr-metadata-validator && chmod 0755 /tmp/pr-metadata-validator
66+
/tmp/pr-metadata-validator --only-close-existing-comments-with-tag="sdc-test-results" "${ISSUE_URL}"
67+
gh pr comment $ISSUE_URL --body-file testoutput.txt
68+
- name: add appropriate labels
69+
if: steps.test-individual-shell-tools.outputs.complete == 'y' || steps.test-jq.outputs.complete == 'y' || steps.test-shell-pipelines.outputs.complete == 'y' || steps.test-implement-cowsay.outputs.complete == 'y'
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
ISSUE_URL: ${{ github.event.pull_request.html_url }}
73+
run: |
74+
gh pr edit $ISSUE_URL --add-label "Complete"
75+
gh pr edit $ISSUE_URL --remove-label "Needs Review"
76+
- name: fail if not complete
77+
if: (steps.test-individual-shell-tools.outputs.attempted == 'y' || steps.test-jq.outputs.attempted == 'y' || steps.test-shell-pipelines.outputs.attempted == 'y' || steps.test-implement-cowsay.outputs.attempted == 'y') && !(steps.test-individual-shell-tools.outputs.complete == 'y' || steps.test-jq.outputs.complete == 'y' || steps.test-shell-pipelines.outputs.complete == 'y' || steps.test-implement-cowsay.outputs.complete == 'y')
78+
run: |
79+
exit -1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
testoutput.txt
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
________________
2+
| Grass, delicious |
3+
================
4+
\
5+
\
6+
^__^
7+
(oo)\_______
8+
(__)\ )\/\
9+
||----w |
10+
|| ||
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
______________
2+
| Fish are cool! |
3+
==============
4+
\
5+
\
6+
\
7+
\
8+
___-------___
9+
_-~~ ~~-_
10+
_-~ /~-_
11+
/^\__/^\ /~ \ / \
12+
/| O|| O| / \_______________/ \
13+
| |___||__| / / \ \
14+
| \ / / \ \
15+
| (_______) /______/ \_________ \
16+
| / / \ / \
17+
\ \^\\ \ / \ /
18+
\ || \______________/ _-_ //\__//
19+
\ ||------_-~~-_ ------------- \ --/~ ~\ || __/
20+
~-----||====/~ |==================| |/~~~~~
21+
(_(__/ ./ / \_\ \.
22+
(_(___/ \_____)_)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Ahmed
2+
Basia
3+
Mehmet
4+
Leila
5+
Piotr
6+
Chandra
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Ahmed London
2+
Basia London
3+
Mehmet Birmingham
4+
Leila London
5+
Piotr Glasgow
6+
Chandra Birmingham

0 commit comments

Comments
 (0)