Commit graph

50 commits

Author SHA1 Message Date
Matthias
e4e8f5703d
Update auto-merge.yml 2022-08-08 16:03:44 +02:00
Matthias
72ed282c86
Create auto-merge.yml 2022-08-05 19:45:15 +02:00
faust
31566419a0
Automatically update Docker description on push (#697) 2022-07-22 17:12:01 +02:00
Matthias
005ce05c24
Trigger CI on push or pull request, but not both (#689)
See
https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
for more info
2022-07-11 18:07:46 +02:00
MichaIng
fb4c6d5559
Skip Docker login on PRs from forks (#586)
Since github.repository_owner refers to the base repository on pull request events, while secrets need to exist on the head repository, the Docker Hub login fails for pull requests opened from forks. This commit assures that this step in case of pull request events only runs for internal pull requests, i.e. when head and base repository are the same.

For the actual Docker Hub upload, no change is required: The build can run in every case, the upload is not done on pull request events in general.

Signed-off-by: MichaIng <micha@dietpi.com>
2022-04-06 19:35:28 +02:00
Matthias
8d9619fb67
Only build release image when release workflow was completed 2022-03-22 20:11:15 +01:00
Matthias
8067e74053
Fix default branch 2022-03-22 19:43:08 +01:00
Matthias
6887543105
Skip Docker push for dependabot PRs 2022-02-18 16:29:26 +01:00
Matthias
21c92ef977
Disable Docker login for dependabot (#519)
See https://github.com/docker/login-action/issues/65
2022-02-18 16:08:48 +01:00
Matthias
d821168f24
Only login to Dockerhub on image push (#515) 2022-02-18 10:49:47 +01:00
Matthias
812663d832
Prevent flaky tests (#514)
Move from example.org to example.com, which seems to be more permissive for testing
2022-02-18 10:29:49 +01:00
Matthias
97e89d7f7b
Multiarch for main Docker workflow (#506) 2022-02-11 16:12:07 +01:00
Matthias
71f3877933
Start pushing on non-pull request 2022-02-11 09:45:40 +01:00
Matthias
12f4134f77
Add Docker semver tagging for new multiarch image (#503) 2022-02-11 09:40:08 +01:00
Matthias
89106d11aa
Update rust.yml 2022-02-06 15:51:18 +01:00
Matthias
0b9e9ecf57
Uppercase Release action 2022-02-06 15:50:24 +01:00
Matthias
bd1e8ba8db Docker workflow fixes
See https://github.com/lycheeverse/lychee/pull/406#issuecomment-983903903
for dicussion
2021-12-02 11:49:43 +01:00
Matthias
ddd4f82bbf
Test pushing Docker new images 2021-12-01 16:06:23 +01:00
Matthias
22ac3c213c
Add dispatch 2021-12-01 10:22:34 +01:00
faust
7353c8793b
Publish arm64 docker image (#406) 2021-12-01 09:58:32 +01:00
Matthias
34f379319d
Fix link checking after upgrade to 0.8.0 (#386) 2021-11-05 22:31:05 +01:00
Matthias
251332efe2
Cache absolute_path to decrease allocations (#346)
* Cache `absolute_path` to decrease allocations

While profiling local file handling, I noticed that resolving paths was taking a
significant amount of time. It also caused quite a few allocations.
By caching the path and using a constant value for the current
directory, we can reduce the number of allocs by quite a lot.
For example, when testing on the sentry documentation, we do 50,4%
less allocations in total now. That's just a single test-case of course,
but it's probably also helping in many other cases as well.

* Defer to_string for attr.value to reduce allocs
* Use Tendrils instead of Strings for parsing (another ~1.5% less allocs)
* Move option parsing code into separate module
* Handle base dir more correctly
* Temporarily disable dry run
2021-10-05 01:37:43 +02:00
Matthias
94cae4e9e5
Skip creating issues on forks (#340) 2021-09-20 12:11:31 +02:00
Matthias
b7bbcf69e9
Don't try to publish Docker image on fork (#332)
* Don't try to publish Docker image on fork

https://github.com/lycheeverse/lychee/issues/321#issuecomment-919161530

* Move if condition to up to job
2021-09-20 11:13:54 +02:00
Matthias
dd667a656c
Undo Docker documentation from CI
It's currently not supported to update docs with a Dockerhub token. See https://github.com/lycheeverse/lychee/pull/325.
2021-09-16 15:54:14 +02:00
faust
e23c6c55d0
Add a description on DockerHub registry (#325) 2021-09-14 15:47:58 +02:00
Matthias
5a2e10799f linting 2021-09-06 15:19:24 +02:00
Daniel Doubrovkine (dB.)
b3f90f925e
Use cargo-publish-all for release. (#312) 2021-09-06 01:07:56 +02:00
Daniel Doubrovkine (dB.)
f866abef61
Fix publish workflow (#309) 2021-09-04 01:49:29 +02:00
Matthias
96c80c3647 Add changes made by @dblock in #304 2021-09-03 19:18:39 +02:00
Matthias
5a26917ba9
Add trigger for manually pushing Docker image 2021-08-20 11:15:32 +02:00
Lucius Hu
228e5df6a3
Major refactor of codebase (#208)
- The binary component and library component are separated as two
  packages in the same workspace.
  - `lychee` is the binary component, in `lychee-bin/*`.
  - `lychee-lib` is the library component, in `lychee-lib/*`.
  - Users can now install only the `lychee-lib`, instead of both
    components, that would require fewer dependencies and faster
    compilation.
  - Dependencies for each component are adjusted and updated. E.g.,
    no CLI dependencies for `lychee-lib`.
  - CLI tests are only moved to `lychee`, as it has nothing to do
    with the library component.
- `Status::Error` is refactored to contain dedicated error enum,
  `ErrorKind`.
  - The motivation is to delay the formatting of errors to strings.
    Note that `e.to_string()` is not necessarily cheap (though
    trivial in many cases). The formatting is no delayed until the
    error is needed to be displayed to users. So in some cases, if
    the error is never used, it means that it won't be formatted at
    all.
- Replaced `regex` based matching with one of the following:
  - Simple string equality test in the case of 'false positivie'.
  - URL parsing based test, in the case of extracting repository and
    user name for GitHub links.
  - Either cases would be much more efficient than `regex` based
    matching. First, there's no need to construct a state machine for
    regex. Second, URL is already verified and parsed on its creation,
    and extracting its components is fairly cheap. Also, this removes
    the dependency on `lazy-static` in `lychee-lib`.
- `types` module now has a sub-directory, and its components are now
  separated into their own modules (in that sub-directory).
- `lychee-lib::test_utils` module is only compiled for tests.
- `wiremock` is moved to `dev-dependency` as it's only needed for
  `test` modules.
- Dependencies are listed in alphabetical order.
- Imports are organized in the following fashion:
  - Imports from `std`
  - Imports from 3rd-party crates, and `lychee-lib`.
  - Imports from `crate::*` or `super::*`.
- No glob import.
- I followed suggestion from `cargo clippy`, with `clippy::all` and
  `clippy:pedantic`.

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
2021-04-15 01:24:11 +02:00
Matthias
a6ebba6b69
Clean up exclude in link checking 2021-02-21 19:13:15 +01:00
Matthias
551c988708
Update links.yml 2021-02-21 17:27:32 +01:00
Matthias Endler
e00cdbf1ae example.com -> example.org 2021-02-21 16:33:33 +01:00
Matthias
a633afc6b9
Use lychee master for link checking 2021-02-15 11:21:29 +01:00
Matthias
5401e3a3d9
Update lychee action to latest version 2021-02-12 18:19:25 +01:00
Paweł Romanowski
fa9c5ea2cf
Run clippy for all targets, including tests (#93)
The test code should also be linted.
2021-01-03 16:41:19 +01:00
Matthias
622dc32585
exclude https://example.com/README.md from link checking 2020-12-15 00:49:27 +01:00
Matthias
534f3c2744
Use lychee for checking links in the lychee repo (#79)
How meta.
2020-12-15 00:45:28 +01:00
Matthias
c7d7c6c952
Build binaries for Linux, Windows, and macOS for every release (#74)
* Build binaries for Linux, Windows, and macOS for every release

* Add vendored-openssl feature flag

This allows us to trigger a build which
includes a static dependency to openssl by compiling it from source in a
build.rs script. It is useful for Linux, which has wildly different config
parameters for different architectures.

* Add openssl-sys as direct dependency

This allows us to pass the vendored-openssl
feature flag to this dependency and compile openssl from source

* Update Cargo.lock

* Cleanup
2020-12-11 22:13:26 +01:00
Matthias
3401999ccc
Publish releases on crates.io (#65) 2020-12-04 13:09:50 +01:00
Matthias
936c5440b1
Add official Docker image #40 2020-12-02 23:43:05 +01:00
Paweł Romanowski
96a92deffd Use more descriptive name for cargo test action 2020-10-16 14:47:54 +02:00
Paweł Romanowski
7bcf2de400 Actually run tests in GitHub actions 2020-10-16 14:38:05 +02:00
Paweł Romanowski
b2ada4746c Introduce cargo fmt and clippy checks, fix all clippy warnings 2020-10-16 14:35:38 +02:00
Xiaochuan Yu
65e8a40973
remove names 2020-10-14 19:19:14 -04:00
Xiaochuan Yu
292064ce90
Update rust.yml 2020-10-14 19:13:40 -04:00
Xiaochuan Yu
096b8756cb use action-rs Actions instead 2020-10-12 23:51:04 -04:00
Matthias
9a71b77bb2
Create rust.yml 2020-08-08 00:09:48 +02:00