Skip to content

Commit

Permalink
Merge pull request #3 from hexlet-basics/main
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
fey authored Jul 24, 2024
2 parents 7739e9c + b1c5a60 commit 297deff
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 49 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM hexletbasics/base-image:latest

ENV var1=value1
ENV var2=value2
ENV var3=value3

WORKDIR /exercises-action

Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
compose-setup: compose-build

compose:
docker-compose up
docker compose up

compose-bash:
docker-compose run exercises bash
docker compose run exercises bash

compose-build:
docker-compose build
docker compose build

compose-test:
docker-compose run exercises make test
docker compose run exercises make test

compose-code-lint:
docker-compose run exercises make code-lint
docker compose run exercises make code-lint

code-lint:
@(for i in $$(find modules -type f -name Makefile); do echo "check $$(dirname $$i)"; done)

compose-description-lint:
docker-compose run exercises make description-lint
docker compose run exercises make description-lint

compose-schema-validate:
docker-compose run exercises make schema-validate
docker compose run exercises make schema-validate

ci-check:
docker-compose --file docker-compose.yml build
docker-compose --file docker-compose.yml up --abort-on-container-exit
docker compose --file docker-compose.yml build
docker compose --file docker-compose.yml up --abort-on-container-exit

release:
git push -f origin main:release
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@

## Develop

```sh
```bash
# setup
$ make
make
# run
$ make compose
make compose
# check
$ make ci-check
make ci-check

# run tests
$ make compose-test
make compose-test

# run linters and validators
$ make compose-code-lint
$ make compose-description-lint
$ make compose-schema-validate
make compose-code-lint
make compose-description-lint
make compose-schema-validate

# release
$ make release
make release
```

##
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://ru.hexlet.io/pages/about?utm_source=github&utm_medium=link&utm_campaign=exercises-action)
---

This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet (in Russian)](https://ru.hexlet.io/pages/about?utm_source=github&utm_medium=link&utm_campaign=exercises-action).
##
[![Hexlet Ltd. logo](https://raw.githubusercontent.com/Hexlet/assets/master/images/hexlet_logo128.png)](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=exercises-action)

This repository is created and maintained by the team and the community of Hexlet, an educational project. [Read more about Hexlet](https://hexlet.io/?utm_source=github&utm_medium=link&utm_campaign=exercises-action).

See most active contributors on [hexlet-friends](https://friends.hexlet.io/).
25 changes: 21 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ runs:
shell: bash

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
with:
# NOTE: Using a docker driver reduces build times.
driver: docker

- name: Login to Docker Hub
if: ${{ github.event_name == 'push' }}
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ inputs.DOCKER_USERNAME }}
password: ${{ inputs.DOCKER_PASSWORD }}
Expand All @@ -35,7 +35,7 @@ runs:
shell: bash

- name: Build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
cache-from: ${{ env.IMAGE_NAME }}:cached
cache-to: type=inline
Expand All @@ -48,7 +48,7 @@ runs:
run: docker push ${{ env.IMAGE_NAME }}:cached
shell: bash

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Check
run: docker-compose --file docker-compose.yml up --abort-on-container-exit
Expand All @@ -58,3 +58,20 @@ runs:
if: ${{ github.event_name == 'push' }}
run: docker push ${{ env.IMAGE_NAME }}:latest
shell: bash

- uses: reviewdog/action-languagetool@v1
with:
# github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-check
# language:
# default: 'ru-RU'
# Change reporter level if you need.
level: info

- name: Spellcheck
uses: addnab/docker-run-action@v3
with:
image: hexlet/languagetool-cli:latest
options: -v ${{ github.workspace }}/modules:/content
run: node ./bin/run.js check /content/**/*.md
11 changes: 11 additions & 0 deletions description.ru.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---

title: 'Language'
header: 'Курс JavaScript: обучение JS для начинающих бесплатно'
description: |
Изучение программирования — интересный и захватывающий процесс.
seo_description: |
Начни Javascript онлайн курс бесплатно
keywords:
- javascript
2 changes: 0 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

version: '3'

services:
exercises:
volumes:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---

version: '3'

services:
exercises:
build: .
Expand Down
9 changes: 0 additions & 9 deletions modules/10-basics/10-first-lesson/description.ru.yml

This file was deleted.

1 change: 1 addition & 0 deletions modules/10-basics/10-first-lesson/ru/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do something
1 change: 1 addition & 0 deletions modules/10-basics/10-first-lesson/ru/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
First-lesson theory
7 changes: 7 additions & 0 deletions modules/10-basics/10-first-lesson/ru/data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

name: first-lesson
tips:
- >
[Немного о 'Hello,
World!'](https://ru.hexlet.io/blog/posts/moy-chelovek-menya-ponimaet-istoriya-frazy-hello-world-i-ee-analogov)
9 changes: 0 additions & 9 deletions modules/10-basics/20-second-lesson/description.ru.yml

This file was deleted.

1 change: 1 addition & 0 deletions modules/10-basics/20-second-lesson/ru/EXERCISE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do something
1 change: 1 addition & 0 deletions modules/10-basics/20-second-lesson/ru/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Second-lesson theory
7 changes: 7 additions & 0 deletions modules/10-basics/20-second-lesson/ru/data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---

name: second-lesson
tips:
- >
[Немного о 'Hello,
World!'](https://ru.hexlet.io/blog/posts/moy-chelovek-menya-ponimaet-istoriya-frazy-hello-world-i-ee-analogov)
10 changes: 10 additions & 0 deletions spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

language:
docker_image: "hexletbasics/exercises-action"
extension: js
exercise_filename: index.js
exercise_test_filename: test.js
learn_as: first_language
progress: completed
name: JavaScript

0 comments on commit 297deff

Please sign in to comment.