├── .dockerignore ├── .github └── workflows │ ├── docker_build.yml │ ├── docker_push.yml │ └── hadolint.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── README.md └── action.yml /.dockerignore: -------------------------------------------------------------------------------- 1 | # basically everything 2 | .gitignore 3 | Dockerfile 4 | action.yml 5 | README.md 6 | .github 7 | -------------------------------------------------------------------------------- /.github/workflows/docker_build.yml: -------------------------------------------------------------------------------- 1 | # via https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-docker-images 2 | # and https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#example-using-multiple-events-with-activity-types-or-configuration 3 | name: Build Docker image 4 | on: [push, pull_request] 5 | 6 | jobs: 7 | just_build: 8 | name: Verify the image can build 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Check out the repo 12 | uses: actions/checkout@v3 13 | - name: Verify Docker build 14 | uses: docker/build-push-action@v3 15 | with: 16 | context: . 17 | push: false 18 | -------------------------------------------------------------------------------- /.github/workflows/docker_push.yml: -------------------------------------------------------------------------------- 1 | # via https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-docker-images 2 | # and https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#example-using-multiple-events-with-activity-types-or-configuration 3 | name: Publish Docker image 4 | on: 5 | push: 6 | branches: 7 | - latest 8 | release: 9 | types: [published] 10 | jobs: 11 | push_to_registry: 12 | name: Push Docker image to GitHub Packages 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Check out the repo 16 | uses: actions/checkout@v3 17 | - name: Push to GitHub Packages 18 | uses: docker/build-push-action@v1 19 | with: 20 | username: ${{ github.actor }} 21 | password: ${{ secrets.GITHUB_TOKEN }} 22 | registry: docker.pkg.github.com # will need to become ghcr.io eventually 23 | repository: arduino-ci/action/ubuntu # has to match organization and repo name, also has to be lowercase 24 | tag_with_ref: true 25 | -------------------------------------------------------------------------------- /.github/workflows/hadolint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Hadolint 3 | 4 | on: [pull_request] 5 | 6 | jobs: 7 | hadolint: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | - uses: reviewdog/action-hadolint@v1 12 | with: 13 | github_token: ${{ secrets.github_token }} 14 | reporter: github-pr-check 15 | # ignore rule about pinning packages -- we always want the latest! 16 | # otherwise when security release come out, the action breaks :( 17 | hadolint_ignore: DL3008 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Arduino-CI/action/b20e4631f2d4e3643faef9bb8a69fafaaa983e05/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/). 6 | 7 | 8 | ## [Unreleased] 9 | ### Added 10 | 11 | ### Changed 12 | 13 | ### Deprecated 14 | 15 | ### Removed 16 | 17 | ### Fixed 18 | 19 | ### Security 20 | 21 | 22 | 23 | ## [0.1.6] - 2023-06-08 24 | ### Changed 25 | - Now uses `arduino_ci` [version `1.6.2`](https://github.com/Arduino-CI/arduino_ci/blob/master/CHANGELOG.md#162---2023-06-08) 26 | 27 | ## [0.1.5] - 2023-01-23 28 | ### Added 29 | - ~~Pre-installation of platforms declared in `default.yml`~~ 30 | 31 | ### Changed 32 | - Now uses `arduino_ci` [version `1.5.0`](https://github.com/Arduino-CI/arduino_ci/blob/master/CHANGELOG.md#150---2023-01-17) 33 | 34 | 35 | ## [0.1.3] - 2021-01-13 36 | ### Changed 37 | - Now uses `arduino_ci` [version `1.3.0`](https://github.com/Arduino-CI/arduino_ci/blob/master/CHANGELOG.md#130---2021-01-13) 38 | 39 | ### Removed 40 | - The use of `SKIP_LIBRARY_PROPERTIES` 41 | 42 | 43 | ## [0.1.2] - 2021-01-06 44 | ### Added 45 | - Publish docker image to GitHub packages on `latest` branch and after tagging 46 | - Instructions for testing locally with Docker 47 | - Adopt new `arduino_ci` version that enables `CUSTOM_INIT_SCRIPT` and `USE_SUBDIR` environment variables 48 | - Python dependencies for espXX board compilation (unfortunately assumed to be present in image, not installed by board manager) 49 | - Instructions for new environment variable `SKIP_LIBRARY_PROPERTIES` 50 | 51 | 52 | ## [0.1.1] - 2020-12-02 53 | ### Added 54 | * Instructions for the new environment variables `EXPECT_EXAMPLES` and `EXPECT_UNITTESTS` 55 | * Documentation now links to unit testing information and `.arduino-ci.yaml` 56 | 57 | ### Changed 58 | * Use non-interactive frontend for `apt-get install` 59 | * Arduino libraries directory is now pre-existing in the image 60 | * Clarified instructions about badges 61 | 62 | 63 | ## [0.1.0] - 2020-11-29 64 | ### Added 65 | - Initial implementation of action 66 | 67 | 68 | [Unreleased]: https://github.com/Arduino-CI/action/compare/v0.1.6...HEAD 69 | [0.1.6]: https://github.com/Arduino-CI/arduino_ci/compare/v0.1.5...v0.1.6 70 | [0.1.5]: https://github.com/Arduino-CI/arduino_ci/compare/v0.1.3...v0.1.5 71 | [0.1.3]: https://github.com/Arduino-CI/arduino_ci/compare/v0.1.2...v0.1.3 72 | [0.1.2]: https://github.com/Arduino-CI/arduino_ci/compare/v0.1.1...v0.1.2 73 | [0.1.1]: https://github.com/Arduino-CI/arduino_ci/compare/v0.1.0...v0.1.1 74 | [0.1.0]: https://github.com/Arduino-CI/arduino_ci/compare/v0.0.0...v0.1.0 75 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to the Arduino CI GitHub Action 2 | 3 | `ArduinoCI/action` uses a very standard GitHub workflow. 4 | 5 | 1. Fork the repository on github 6 | 2. Make your desired changes on top of the latest `master` branch, document them in [CHANGELOG.md](CHANGELOG.md) 7 | 3. Push to your personal fork 8 | 4. Open a pull request 9 | * If you are submitting code, use `master` as the base branch 10 | * If you are submitting broken unit tests (illustrating a bug that should be fixed), use `tdd` as the base branch. 11 | 12 | 13 | ## Maintaining the Action 14 | 15 | * Merge pull request with new features 16 | * `git stash save` (at least before the push step, but easiest here). 17 | * `git pull --rebase` 18 | * Update the sections of `CHANGELOG.md` 19 | * `git add README.md CHANGELOG.md` 20 | * `git commit -m "vVERSION bump"` 21 | * `git tag -a vVERSION -m "Released version VERSION"` 22 | * `git push upstream` 23 | * `git push -f upstream master:latest` 24 | * `git push -f upstream master:stable-1.x` 25 | * `git push upstream --tags` 26 | * `git checkout master` 27 | * `git stash pop` 28 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.6-slim 2 | 3 | # GitHub build args that we can expose in the image 4 | ARG BUILD_DATE 5 | ARG BUILD_REVISION 6 | ARG BUILD_VERSION 7 | 8 | # Values we set in more than one place in this file 9 | ARG ARDUINO_CI_VERSION=1.6.2 10 | ARG ARDUINO_CI_ACTION_REPO="https://github.com/ArduinoCI/action" 11 | ARG ARDUINO_CI_MAINTAINER="Arduino Continuous Integration " 12 | 13 | ## IF USING A RELEASED GEM - also check lower in the file 14 | ARG ARDUINO_CI_GITREPO="https://github.com/Arduino-CI/arduino_ci.git" 15 | ARG ARDUINO_CI_GITREF="tag: 'v$ARDUINO_CI_VERSION'" 16 | ## ELSE 17 | # ARG ARDUINO_CI_GITREPO="https://github.com/ianfixes/arduino_ci.git" 18 | # ARG ARDUINO_CI_GITREF="branch: '2023-06-07_nano_every'" 19 | ## END 20 | 21 | LABEL com.github.actions.name="Arduino CI" \ 22 | com.github.actions.description="Unit testing and example compilation for Arduino libraries" \ 23 | com.github.actions.color="blue" \ 24 | com.github.actions.icon="cpu" \ 25 | maintainer=$ARDUINO_CI_MAINTAINER \ 26 | org.opencontainers.image.created=$BUILD_DATE \ 27 | org.opencontainers.image.revision=$BUILD_REVISION \ 28 | org.opencontainers.image.version=$BUILD_VERSION \ 29 | org.opencontainers.image.authors=$ARDUINO_CI_MAINTAINER \ 30 | org.opencontainers.image.url=$ARDUINO_CI_ACTION_REPO \ 31 | org.opencontainers.image.source=$ARDUINO_CI_REPO \ 32 | org.opencontainers.image.documentation=$ARDUINO_CI_ACTION_REPO \ 33 | org.opencontainers.image.vendor="Arduino CI" \ 34 | org.opencontainers.image.description="Unit testing and example compilation for Arduino libraries" \ 35 | repository=$ARDUINO_CI_ACTION_REPO \ 36 | homepage=$ARDUINO_CI_ACTION_REPO \ 37 | arduino_ci_gem_version=$ARDUINO_CI_VERSION \ 38 | arduino_ci_gem_repo=$ARDUINO_CI_GITREPO \ 39 | arduino_ci_gitref=$ARDUINO_CI_GITREF 40 | 41 | # Values for debugging 42 | ENV BUILD_DATE=$BUILD_DATE \ 43 | BUILD_REVISION=$BUILD_REVISION \ 44 | BUILD_VERSION=$BUILD_VERSION 45 | 46 | ENV BUNDLE_GEMFILE=/action/Gemfile \ 47 | DEBIAN_FRONTEND=noninteractive 48 | 49 | # Note that python is installed not because we need it but because Arduino platforms need it 50 | RUN true \ 51 | && apt-get update \ 52 | && apt-get install -qq --no-install-recommends \ 53 | git \ 54 | curl \ 55 | g++ \ 56 | time \ 57 | jq \ 58 | python3 \ 59 | python3-pip \ 60 | python3-yaml \ 61 | && apt-get clean \ 62 | && rm -rf /var/lib/apt/lists/* \ 63 | && pip install pyserial \ 64 | && pip3 install pyserial 65 | 66 | # install arduino_ci 67 | RUN true \ 68 | && mkdir -p /action/bundle \ 69 | && echo "source 'https://rubygems.org'" > $BUNDLE_GEMFILE \ 70 | ## IF USING A RELEASED GEM 71 | && echo "gem 'arduino_ci', '=$ARDUINO_CI_VERSION'" >> $BUNDLE_GEMFILE \ 72 | ## ELSE 73 | # && echo "gem 'arduino_ci', git: '$ARDUINO_CI_GITREPO', $ARDUINO_CI_GITREF" >> $BUNDLE_GEMFILE \ 74 | ## END 75 | && cat $BUNDLE_GEMFILE \ 76 | && bundle install --gemfile /action/Gemfile --path /action/bundle \ 77 | && find /action |grep arduino_ci.rb 78 | 79 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] 80 | 81 | # install the version of the CLI backend specified in the project, such that it's in $PATH for later discovery 82 | # then verify that the package downloaded to a usable location, and create the libraries directory 83 | RUN curl -fsSL "https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh" \ 84 | | BINDIR=/usr/local/bin sh -s $(bundle exec ruby -e "require 'arduino_ci'; print ArduinoCI::ArduinoInstallation::DESIRED_ARDUINO_CLI_VERSION") \ 85 | && echo "Now running arduino ensure_arduino_installation.rb" \ 86 | && bundle exec time /action/bundle/ruby/2.6.0/bin/ensure_arduino_installation.rb 87 | 88 | # # Install common platforms by converting YAML to JSON and generating installation commands to run 89 | # # 90 | # # Although it seems wasteful to pull in python dependencies for just this, remember that (some) arduino 91 | # # platforms themselves require python to be available on the host, so we are taking advantage of a 92 | # # package that is already required. 93 | # RUN true \ 94 | # && python3 -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < $(bundle show arduino_ci)/misc/default.yml \ 95 | # | jq -r '.packages | to_entries[] \ 96 | # | "arduino-cli core install \(.key) --additional-urls \(.value.url)"' \ 97 | # | sh 98 | 99 | 100 | # Just like that 101 | ENTRYPOINT ["bundle", "exec", "/action/bundle/ruby/2.6.0/bin/arduino_ci.rb"] 102 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino-CI GitHub Action 2 | 3 | This repository is for the **GitHub Action** to run [`arduino_ci`](https://github.com/Arduino-CI/arduino_ci) on a repository containing an Arduino library. You can also run it locally with Docker, _right now_, if that's easier -- see below. 4 | 5 | 6 | ## Why You Should Use This Action 7 | 8 | - Contributions to your Arduino library are tested automatically, _without_ the need for hardware present 9 | - Example sketches in your `examples/` directory are compiled automatically, to detect broken code in the default branch 10 | 11 | ### See Also 12 | * [`arduino-lint` action](https://github.com/marketplace/actions/arduino-arduino-lint-action) for verifying metadata (e.g. `library.properties`) and structural aspects of a library 13 | 14 | ## Adding Arduino CI Pull Request Tests To Your Project 15 | 16 | 1. Create a new YAML file in your repository's `.github/workflows` directory, e.g. `.github/workflows/arduino_ci.yml` 17 | 2. Copy an example workflow from below into that new file, no extra configuration required 18 | 3. Commit that file to a new branch 19 | 4. Open up a pull request and observe the action working 20 | 5. Merge into your default branch to enable testing of all following pull requests 21 | 22 | 23 | ### Configuring a Workflow to Use the GitHub Action 24 | 25 | There are several ways to specify what version of the action to run. 26 | 27 | Value for `uses:` | Meaning | Pros | Cons 28 | -------------------------------|---------|------|------ 29 | `Arduino-CI/action@v0.1.6` | exact version | Complete control | Adopt new versions manually, which may be tiresome if you have many libraries 30 | `Arduino-CI/action@latest` | bleeding-edge unreleased `arduino_ci` version | Receive latest features & fixes automatically | High risk of encountering breaking changes or new bugs 31 | `Arduino-CI/action@stable-1.x` | use highest available `arduino_ci` version that is < `2.0.0` | Receive latest features & fixes automatically, but avoids breaking changes | Not a 100% guarantee against unintended CI changes 32 | 33 | Using `Arduino-CI/action@stable-1.x` is **recommended**, so the contents listed below for `.github/workflows/arduino_ci.yml` should work for most users. 34 | 35 | ```yml 36 | --- 37 | name: Arduino_CI 38 | 39 | on: [pull_request] 40 | 41 | jobs: 42 | arduino_ci: 43 | runs-on: ubuntu-latest 44 | 45 | steps: 46 | - uses: actions/checkout@v3 47 | - uses: Arduino-CI/action@stable-1.x 48 | ``` 49 | 50 | The full set of configuration options for the action is enumerated here; note that if the `env:` section is empty, it must be commented out or deleted as well. 51 | 52 | ```yml 53 | --- 54 | name: Arduino_CI 55 | 56 | on: [pull_request] 57 | 58 | jobs: 59 | arduino_ci: 60 | runs-on: ubuntu-latest 61 | 62 | steps: 63 | - uses: actions/checkout@v3 64 | - uses: Arduino-CI/action@stable-1.x # or latest, or a pinned version 65 | env: 66 | # Not all libraries are in the root directory of a repository. 67 | # Specifying the path of the library here (relative to the root 68 | # of the repository) will adjust that. 69 | # 70 | # The default is the current directory 71 | # 72 | USE_SUBDIR: . 73 | 74 | # Not all libraries include examples or unit tests. The default 75 | # behavior of arduino_ci is to assume that "if the files don't 76 | # exist, then they were not MEANT to exist". In other words, 77 | # if you were to accidentally delete all your tests or example 78 | # sketches, then the CI runner would by default assume that was 79 | # intended and return a passing result. 80 | # 81 | # If you'd rather have the test runner fail the test in the 82 | # absence of either tests or examples, uncommenting either of 83 | # the following variables to 'true' (as appropriate) will 84 | # enforce that. 85 | # 86 | EXPECT_EXAMPLES: false 87 | EXPECT_UNITTESTS: false 88 | 89 | # Although dependencies will be installed automatically via the 90 | # library manager, your library under test may require an 91 | # unofficial version of a dependency. In those cases, the custom 92 | # libraries must be insalled prior to the test execution; those 93 | # installation commands should be placed in a shell script (that 94 | # will be executed by /bin/sh) stored in your library. 95 | # 96 | # Then, set this variable to the path to that file (relative to 97 | # the root of your repository). The script will be run from 98 | # within the Arduino libraries directory; you should NOT attempt 99 | # to find that directory nor change to it from within the script. 100 | # 101 | # CUSTOM_INIT_SCRIPT: install_dependencies.sh 102 | ``` 103 | 104 | ### Status Badges 105 | 106 | You can show Arduino CI status with a badge in your repository `README.md` 107 | 108 | ```markdown 109 | [![Arduino CI](https://github.com///workflows/Arduino_CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) 110 | ``` 111 | 112 | > Note that 113 | > * you must replace `` with your GitHub username 114 | > * you must replace `` with the name of the GitHub repository 115 | > * `Arduino_CI` in the URL must match the `name: Arduino_CI` line in the example YAML files above 116 | 117 | 118 | ## Configuring Behavior of the Arduino CI Test Runner Itself 119 | 120 | When configuring the test runner itself, it's more efficient to run `arduino_ci` locally -- it works on the same OSes as the Arduino IDE. Instructions for setting that up can be found at [the `arduino_ci` project homepage on GitHub](https://github.com/Arduino-CI/arduino_ci). If you are using OSX or Linux, you have the additional option of running Arduino CI directly from Docker -- see below. 121 | 122 | 123 | ### Writing Unit Tests 124 | 125 | For information on Arduino unit testing with `arduino_ci`, see the [`REFERENCE.md` for Arduino CI's section on unit testing](https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md#writing-unit-tests-in-test) 126 | 127 | 128 | ### Testing Different Arduino Platforms 129 | 130 | By default, any unit tests and example sketches are tested against a modest set of Arduino platforms. If you have architectures defined in `library.properties`, that will further refine the set of what is tested. You can further override this configuration in several specific ways; for details, see the [`REFERENCE.md` for Arduino CI's section on CI configuration](https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md#indirectly-overriding-build-behavior-medium-term-use-and-advanced-options) 131 | 132 | The default configuration is [available in the `arduino_ci` project](https://github.com/Arduino-CI/arduino_ci/blob/master/misc/default.yml), and shows how the platforms and packages are configured (including 3rd-party board provider information). 133 | 134 | 135 | ## Immediate Usage / Development Workflow using Docker 136 | 137 | The same Docker image used by the GitHub action is available for local testing, and should function properly on Linux and OSX hosts with [Docker](https://www.docker.com/products/docker-desktop) installed. Choose the command that best matches the state of your project, and use the `- 138 | 139 | 140 | ### Your Arduino Libraries directory has everything set up just right; you just want to get up and running and not worry about dependencies at all 141 | 142 | Component |Path 143 | ----------------------------------------|---- 144 | Arduino's "libraries" directory | `/pathTo/Arduino/libraries` 145 | Your library under test, called `mylib` | `/pathTo/Arduino/libraries/mylib` 146 | A custom library `mylib` depends on | `/pathTo/Arduino/libraries/custom` 147 | 148 | 149 | In this situation, you've got a mix of libraries installed locally (the one that will be tested amongst any possible dependencies), and they all work as expected (even though you're not quite sure all of them are up to date, nor whether they have local modifications that aren't part of the official library release). This setup won't work in CI, but by volume-mounting the libraries directory into the container and using your own library as the working directory, you can ensure that arduino_ci is using the _exact_ same set of dependencies. 150 | 151 | > This is also the fastest way to test new versions of dependencies. 152 | 153 | You would run the following (substituting your own library's name in place of `mylib`): 154 | 155 | ```bash 156 | docker run --rm \ 157 | -v "/pathTo/Arduino/libraries:/root/Arduino/libraries" \ 158 | --workdir /root/Arduino/libraries/mylib \ 159 | docker.pkg.github.com/arduino-ci/action/ubuntu 160 | ``` 161 | 162 | 163 | ### Your Arduino Library uses only "official" library versions as dependencies 164 | 165 | Component |Path 166 | ----------------------------------------|---- 167 | Arduino's "libraries" directory | `/pathTo/Arduino/libraries` 168 | Your library under test, called `mylib` | `/pathTo/Arduino/libraries/mylib` 169 | 170 | In this situation, the only libraries you need for your library to work are those that you've downloaded directly from the library manager and no special modifications need to be made. We simply volume mount the library under test into the container, set that directory to be the working directory, and let the `arduino_ci` test runner install the dependencies directly. 171 | 172 | If your project does not include a `library.properties` that defines your project's name, you should change `library_under_test` to `mylib`. 173 | 174 | ```bash 175 | docker run --rm \ 176 | -v "/pathTo/Arduino/libraries/mylib:/library_under_test" \ 177 | --workdir /library_under_test \ 178 | docker.pkg.github.com/arduino-ci/action/ubuntu 179 | ``` 180 | 181 | 182 | ### Your Arduino Library uses libraries or versions as dependencies that can't be installed by name from the Arduino library manager (but you wrote a script to install them automatically) 183 | 184 | Component |Path 185 | -----------------------------------------|---- 186 | Arduino's "libraries" directory | `/pathTo/Arduino/libraries` 187 | Your library under test, called `mylib` | `/pathTo/Arduino/libraries/mylib` 188 | Shell script to install `custom` library | `/pathTo/Arduino/libraries/mylib/install.sh` 189 | A custom library `mylib` depends on | `/pathTo/Arduino/libraries/custom` 190 | 191 | In this situation, you have a custom library that can't be installed by the library manager. Fortunately, you've supplied an `install.sh` script that will download and unpack a library to the current working directory (which Arduino CI's test runner will run from inside the container's Arduino libraries directory). Note the _relative_ path used for `install.sh`. 192 | 193 | ```bash 194 | docker run --rm \ 195 | -v "/pathTo/Arduino/libraries/mylib:/library_under_test" \ 196 | --workdir /library_under_test \ 197 | --env CUSTOM_INIT_SCRIPT=install.sh \ 198 | docker.pkg.github.com/arduino-ci/action/ubuntu 199 | ``` 200 | 201 | 202 | ### Your Arduino Library is a subdirectory of a monorepo, you need libraries or versions as dependencies that can't be installed by name from the Arduino library manager, you wrote a script to install them automatically 203 | 204 | Component |Path 205 | -----------------------------------------|---- 206 | Arduino's "libraries" directory | `/pathTo/Arduino/libraries` 207 | A custom library `mylib` depends on | `/pathTo/Arduino/libraries/custom` 208 | Your library under test, called `mylib` | `/pathTo/Monorepo/mylib` 209 | Shell script to install `custom` library | `/pathTo/Monorepo/mylib/install.sh` 210 | 211 | 212 | All the bells and whistles. Note that the relative path of `install.sh` is considered _after_ the `USE_SUBDIR` directory has been applied. 213 | 214 | ```bash 215 | docker run --rm \ 216 | -v "/pathTo/Monorepo:/library_under_test" \ 217 | --workdir /library_under_test \ 218 | --env USE_SUBDIR=mylib \ 219 | --env CUSTOM_INIT_SCRIPT=install.sh \ 220 | docker.pkg.github.com/arduino-ci/action/ubuntu 221 | ``` 222 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'arduino_ci' 2 | author: 'Ian Katz' 3 | description: 'Run arduino_ci: unit tests and example compilation' 4 | runs: 5 | using: 'docker' 6 | image: 'Dockerfile' 7 | branding: 8 | icon: 'cpu' 9 | color: 'blue' 10 | --------------------------------------------------------------------------------