Add Knapsack exercise #397
Workflow file for this run
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
name: Exercism Erlang Track verification | |
on: [push, pull_request] | |
jobs: | |
create_otp_matrix: | |
name: Generate a list of last OTP versions | |
runs-on: ubuntu-22.04 | |
outputs: | |
otps: ${{ steps.versions.outputs.versions }} | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Get latest OTP versions | |
id: versions | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
all_versions=$(gh api graphql -f query='query { repository(owner: "erlang", name: "otp") { releases(last: 100, orderBy: {field: CREATED_AT, direction: ASC}) { nodes { tagName } } } }' --jq '.data.repository.releases.nodes[].tagName | select(. | contains("rc") | not) | .[4:8]' | sort -u -n) | |
latest_versions=$(./bin/get_latest_majors_for_ci_matrix.py <<< "$all_versions") | |
printf "::set-output name=versions::%s" "$latest_versions" | |
test_erlang: | |
name: Test examples against OTP ${{ matrix.otp }} | |
runs-on: ubuntu-22.04 | |
needs: [create_otp_matrix] | |
strategy: | |
matrix: | |
otp: ${{fromJson(needs.create_otp_matrix.outputs.otps)}} | |
container: | |
image: erlang:${{ matrix.otp }} | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- name: Install dependencies | |
run: apt update && apt install --yes jq | |
- name: run tests | |
run: ./bin/run_ci.sh |